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.

20 lines
778 B

  1. '***************************************************************************
  2. 'This script tests the ability to set up instances with keyholes and read
  3. 'back the path
  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. Service.Security_.ImpersonationLevel = 3
  9. Set o = Service.Get ("sms_package")
  10. WScript.Echo o.Path_.DisplayName
  11. Set NewPackage = o.SpawnInstance_
  12. NewPackage.Description = "Scripting API Test Package"
  13. Set ObjectPath = NewPackage.Put_
  14. WScript.Echo "Path of new Package is", ObjectPath.RelPath
  15. if Err <> 0 Then
  16. WScript.Echo Err.Description
  17. End if