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.

21 lines
547 B

  1. on error resume next
  2. const wbemPrivilegeDebug = 19
  3. set service = GetObject ("winmgmts:{impersonationLevel=impersonate}")
  4. service.security_.privileges.Add wbemPrivilegeDebug
  5. if err <> 0 then
  6. WScript.Echo Hex(Err.Number), Err.Description, Err.Source
  7. end if
  8. set process = service.get ("Win32_Process.Handle=""24""")
  9. if IsNull(process.priority) then
  10. WScript.Echo process.Name, "<NULL>"
  11. else
  12. WScript.Echo process.name, process.priority
  13. end if
  14. if err <> 0 then
  15. WScript.Echo Err.Number, Err.Description, Err.Source
  16. end if