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.

39 lines
1.1 KiB

  1. on error resume next
  2. const wbemPrivilegeSecurity = 7
  3. const wbemPrivilegeDebug = 19
  4. const wbemPrivilegeUndock = 24
  5. set locator = CreateObject("WbemScripting.SWbemLocator")
  6. locator.Security_.Privileges.Add wbemPrivilegeSecurity
  7. locator.Security_.Privileges.Add wbemPrivilegeUndock
  8. Set Privilege = locator.Security_.Privileges(wbemPrivilegeSecurity)
  9. WScript.Echo Privilege.Name
  10. locator.Security_.Privileges.Add 6535
  11. if err <> 0 then
  12. WScript.Echo Err.Number, Err.Description, Err.Source
  13. err.clear
  14. end if
  15. locator.Security_.Privileges.Add wbemPrivilegeDebug
  16. for each Privilege in locator.Security_.Privileges
  17. Wscript.Echo ""
  18. WScript.Echo Privilege.DisplayName
  19. WScript.Echo Privilege.Identifier, Privilege.Name, Privilege.IsEnabled
  20. next
  21. locator.Security_.Privileges(wbemPrivilegeDebug).IsEnabled = false
  22. for each Privilege in locator.Security_.Privileges
  23. Wscript.Echo ""
  24. WScript.Echo Privilege.DisplayName
  25. WScript.Echo Privilege.Identifier, Privilege.Name, Privilege.IsEnabled
  26. next
  27. if err <> 0 then
  28. WScript.Echo Err.Number, Err.Description, Err.Source
  29. end if