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.

27 lines
728 B

  1. On Error Resume Next
  2. Set Disk = GetObject ("winmgmts:{impersonationLevel=impersonate}!Win32_LogicalDisk=""C:""")
  3. Set Keys = Disk.Path_.Keys
  4. for each Key in Keys
  5. WScript.Echo "Key has name", Key.Name, "and value", Key.Value
  6. next
  7. Set Names = CreateObject("WbemScripting.SWbemNamedValueSet")
  8. Set Value = Names.Add ("fred", 25)
  9. WScript.Echo "Named Value Set contains a value called", Value.Name, _
  10. "which is set to", Value.Value
  11. if Err <> 0 Then
  12. WScript.Echo "**************"
  13. WScript.Echo "TEST FAILED!"
  14. WScript.Echo "**************"
  15. WScript.Echo Err.Number, Err.Description
  16. Err.Clear
  17. else
  18. WScript.Echo "**************"
  19. WScript.Echo "TEST PASSED!!!"
  20. WScript.Echo "**************"
  21. End If