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

On Error Resume Next
Set t_Service = GetObject("winmgmts://./root/default")
Set t_Class = t_Service.Get("foo")
If Err = 0 Then
WScript.Echo "Connected OK"
Else
WScript.Echo "Error"
WScript.Echo Err.Number
WScript.Echo Err.Description
WScript.Echo Err.Source
'WScript.Echo "Failure: " + Err.Number + " " + Err.Description
Err.Clear
End If