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.

22 lines
523 B

  1. var S = GetObject("winmgmts:root/default");
  2. var C = S.Get();
  3. C.Path_.Class = "PUTCLASSTEST00";
  4. var P = C.Properties_.Add ("p", 19);
  5. P.Qualifiers_.Add ("key", true);
  6. C.Put_();
  7. var C = GetObject("winmgmts:root/default:PUTCLASSTEST00");
  8. var I = C.SpawnInstance_ ();
  9. WScript.Echo ("Relpath of new instance is", I.Path_.Relpath);
  10. I.Properties_("p") = 11;
  11. WScript.Echo ("Relpath of new instance is", I.Path_.Relpath);
  12. var NewPath = I.Put_();
  13. WScript.Echo ("path of new instance is", NewPath.path);