Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
592 B

  1. on error resume next
  2. const wbemPrivilegeDebug = 19
  3. set locator = CreateObject("WbemScripting.SWbemLocator")
  4. locator.Security_.Privileges.Add wbemPrivilegeDebug
  5. set service = locator.connectserver
  6. service.security_.impersonationLevel = 3
  7. set processes = service.instancesof ("Win32_Process")
  8. for each process in processes
  9. if IsNull(process.priority) then
  10. WScript.Echo process.Name, process.Handle, "<NULL>"
  11. else
  12. WScript.Echo process.name, process.Handle, process.priority
  13. end if
  14. next
  15. if err <> 0 then
  16. WScript.Echo Err.Number, Err.Description, Err.Source
  17. end if