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.

41 lines
1.0 KiB

  1. VERSION 5.00
  2. Begin VB.Form Form1
  3. Caption = "Form1"
  4. ClientHeight = 3195
  5. ClientLeft = 60
  6. ClientTop = 345
  7. ClientWidth = 4680
  8. LinkTopic = "Form1"
  9. ScaleHeight = 3195
  10. ScaleWidth = 4680
  11. StartUpPosition = 3 'Windows Default
  12. End
  13. Attribute VB_Name = "Form1"
  14. Attribute VB_GlobalNameSpace = False
  15. Attribute VB_Creatable = False
  16. Attribute VB_PredeclaredId = True
  17. Attribute VB_Exposed = False
  18. Option Explicit
  19. Private Sub Form_Load()
  20. Dim l As New SWbemLocator
  21. Dim s As SWbemServices
  22. Dim i As SWbemObject
  23. Set s = l.ConnectServer("wessms1", "root\sms\site_wn1", "smsadmin", "Elvis1")
  24. 'Stop
  25. On Error Resume Next
  26. Set i = s.Get("nonexistantobject")
  27. If Err.Number <> 0 Then
  28. On Error Resume Next
  29. Dim e As SWbemLastError
  30. Set e = CreateObject("WbemScripting.SWbemLastError")
  31. Debug.Print e.GetObjectText_
  32. End If
  33. End Sub