This By Request VBS script was created as an example of how you can trap or see both the error number and its Hex equivalent for a specified error. I also added the Error description as well.
VBS Script:
On Error Resume Next
strComputer = "BogusMachineName"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CimV2")
If Err.Number <> 0 Then
MsgBox "Error Description: " & Err.Description & VbCr _
& "Error Number: " & Err.Number & VbCr _
& "Hex Error: " & Hex(Err.Number)
Err.Clear
End If
No Comments