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.

29 lines
673 B

  1. On Error Resume Next
  2. Set S = GetObject("winmgmts:root/default")
  3. Set C = S.Get
  4. C.Path_.Class = "PUTCLASSTEST00"
  5. Set P = C.Properties_.Add ("p", 19)
  6. P.Qualifiers_.Add "key", true
  7. C.Put_
  8. Set C = GetObject("winmgmts:[locale=ms_409]!root/default:PUTCLASSTEST00")
  9. Set I = C.SpawnInstance_
  10. WScript.Echo "Relpath of new instance is", I.Path_.Relpath
  11. I.Properties_("p") = 11
  12. WScript.Echo "Relpath of new instance is", I.Path_.Relpath
  13. Set NewPath = I.Put_
  14. WScript.Echo "path of new instance is", NewPath.path
  15. WScript.Echo "locale of new instance is", NewPath.locale
  16. If Err <> 0 Then
  17. WScript.Echo Err.Number, Err.Description
  18. Err.Clear
  19. End If