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.

23 lines
865 B

  1. '***************************************************************************
  2. 'This script tests the ability to set up instances with keyholes and read
  3. 'back the path and key
  4. '***************************************************************************
  5. On Error Resume Next
  6. Set Locator = CreateObject("WbemScripting.SWbemLocator")
  7. Set Service = Locator.ConnectServer ("lamard3", "root\sms\site_la3", "smsadmin", "Elvis1")
  8. if Err <> 0 Then
  9. WScript.Echo Err.Description
  10. End if
  11. Service.Security_.ImpersonationLevel = 3
  12. Set NewPackage = Service.Get ("SMS_Package").SpawnInstance_
  13. NewPackage.Description = "Scripting API Test Package"
  14. Set ObjectPath = NewPackage.Put_
  15. WScript.Echo "Path of new Package is", ObjectPath.RelPath
  16. WScript.Echo "New key value is:", ObjectPath.Keys("PackageID")
  17. if Err <> 0 Then
  18. WScript.Echo Err.Description
  19. End if