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.

15 lines
725 B

  1. //***************************************************************************
  2. //This script tests the ability to set up instances with keyholes and read
  3. //back the path
  4. //***************************************************************************
  5. var Locator = new ActiveXObject("WbemScripting.SWbemLocator");
  6. var Service = Locator.ConnectServer ("lamard3", "root\\sms\\site_la3", "smsadmin", "Elvis1");
  7. Service.Security_.ImpersonationLevel = 3;
  8. var o = Service.Get ("sms_package");
  9. WScript.Echo (o.Path_.DisplayName);
  10. var NewPackage = o.SpawnInstance_();
  11. NewPackage.Description = "Scripting API Test Package";
  12. var ObjectPath = NewPackage.Put_();
  13. WScript.Echo ("Path of new Package is", ObjectPath.RelPath);