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.

57 lines
2.4 KiB

  1. on error resume next
  2. const wbemPrivilegeCreateToken = 1
  3. const wbemPrivilegePrimaryToken = 2
  4. const wbemPrivilegeLockMemory = 3
  5. const wbemPrivilegeIncreaseQuota = 4
  6. const wbemPrivilegeMachineAccount = 5
  7. const wbemPrivilegeTcb = 6
  8. const wbemPrivilegeSecurity = 7
  9. const wbemPrivilegeTakeOwnership = 8
  10. const wbemPrivilegeLoadDriver = 9
  11. const wbemPrivilegeSystemProfile = 10
  12. const wbemPrivilegeSystemtime = 11
  13. const wbemPrivilegeProfileSingleProcess = 12
  14. const wbemPrivilegeIncreaseBasePriority = 13
  15. const wbemPrivilegeCreatePagefile = 14
  16. const wbemPrivilegeCreatePermanent = 15
  17. const wbemPrivilegeBackup = 16
  18. const wbemPrivilegeRestore = 17
  19. const wbemPrivilegeShutdown = 18
  20. const wbemPrivilegeDebug = 19
  21. const wbemPrivilegeAudit = 20
  22. const wbemPrivilegeSystemEnvironment = 21
  23. const wbemPrivilegeChangeNotify = 22
  24. const wbemPrivilegeRemoteShutdown = 23
  25. set locator = CreateObject("WbemScripting.SWbemLocator")
  26. locator.security_.privileges.Add wbemPrivilegeSecurity
  27. set service = locator.connectserver (,"root/scenario26")
  28. service.security_.privileges.Add wbemPrivilegeCreateToken
  29. service.security_.privileges.Add wbemPrivilegePrimaryToken
  30. service.security_.privileges.Add wbemPrivilegeLockMemory
  31. service.security_.privileges.Add wbemPrivilegeIncreaseQuota
  32. service.security_.privileges.Add wbemPrivilegeMachineAccount
  33. service.security_.privileges.Add wbemPrivilegeTcb
  34. service.security_.privileges.Add wbemPrivilegeTakeOwnership
  35. service.security_.privileges.Add wbemPrivilegeLoadDriver
  36. service.security_.privileges.Add wbemPrivilegeSystemProfile
  37. service.security_.privileges.Add wbemPrivilegeSystemTime
  38. service.security_.privileges.Add wbemPrivilegeProfileSingleProcess
  39. service.security_.privileges.Add wbemPrivilegeIncreaseBasePriority
  40. service.security_.privileges.Add wbemPrivilegeCreatePagefile
  41. service.security_.privileges.Add wbemPrivilegeCreatePermanent
  42. service.security_.privileges.Add wbemPrivilegeBackup
  43. service.security_.privileges.Add wbemPrivilegeRestore
  44. service.security_.privileges.Add wbemPrivilegeShutdown
  45. service.security_.privileges.Add wbemPrivilegeDebug
  46. service.security_.privileges.Add wbemPrivilegeAudit
  47. service.security_.privileges.Add wbemPrivilegeSystemEnvironment
  48. service.security_.privileges.Add wbemPrivilegeChangeNotify, false
  49. service.security_.privileges.Add wbemPrivilegeRemoteShutdown
  50. set obj = service.get ("Scenario26.key=""x""")
  51. if err <> 0 then
  52. WScript.Echo Hex(Err.Number), Err.Description
  53. end if