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
531 B

  1. on error resume next
  2. set service = GetObject ("winmgmts:{impersonationLevel=impersonate}")
  3. if err <> 0 then
  4. WScript.Echo Hex(Err.Number), Err.Description, Err.Source
  5. end if
  6. set processes = service.instancesof ("Win32_Process")
  7. for each process in processes
  8. if IsNull(process.priority) then
  9. WScript.Echo process.Name, process.handle, "<NULL>"
  10. else
  11. WScript.Echo process.name, process.handle, process.priority
  12. end if
  13. next
  14. if err <> 0 then
  15. WScript.Echo Err.Number, Err.Description, Err.Source
  16. end if