humbletech99
Programmer
I have a script with the following code block:
However, when I run it where strServer = nonExistantMachine I get a complete lack of error handling:
Why is this occurring if I have told it to continue on error so that I can handle it myself?
Code:
...
Err.Clear
On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & strServer & "\root\CIMV2")
If Err.Number Then
<QUIT GRACEFULLY>
End If
...
Code:
(290, 14) Microsoft VBScript runtime error: The remote server machine does not exist or is unavailable