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.

28 lines
613 B

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