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.

18 lines
368 B

  1. On Error Resume Next
  2. Set t_Service = GetObject("winmgmts://./root/default")
  3. Set t_Class = t_Service.Get("foo")
  4. If Err = 0 Then
  5. WScript.Echo "Connected OK"
  6. Else
  7. WScript.Echo "Error"
  8. WScript.Echo Err.Number
  9. WScript.Echo Err.Description
  10. WScript.Echo Err.Source
  11. 'WScript.Echo "Failure: " + Err.Number + " " + Err.Description
  12. Err.Clear
  13. End If