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
754 B

  1. //***************************************************************************
  2. //This script tests the ability to set up instances with keyholes and read
  3. //back the path and key
  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 NewPackage = Service.Get ("SMS_Package").SpawnInstance_();
  9. NewPackage.Description = "Scripting API Test Package";
  10. var ObjectPath = NewPackage.Put_();
  11. WScript.Echo ("Path of new Package is", ObjectPath.RelPath);
  12. WScript.Echo ("New key value is:", ObjectPath.Keys("PackageID"));