JosephB
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 1/12/2012
-
Status: offline
|
WMI - VBScript Error -- For CreateObject - WbemScripting.SWbemLastError
Thursday, January 12, 2012 8:08 AM
( permalink)
I always get an error trying to do CreateObject on "WbemScripting.SWbemLastError" to get descriptive error detail, when an error is raised on a WMI object in my WMI - VBScript. ... I can't figure out why I am getting this VBScript error, as I am following the example in the Microsoft scripting guide book and on the Technet site. NOTES: 1. I have tried running my WMI - VBScript on two Win XP - SP3 PC's and both PC's give me the same error. 2. I can successfully access WMI via a monkier: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"). and I can successfully perform an "objWMIService.ExecQuery". 3. I just can *not* get "Set WMIError = CreateObject("WbemScripting.SWbemLastError" to work at all. 4. P.S. I also performed various WMI Repair Techniques found on the Web which included rebuilding the Wmi Repopository and re-registering the WMI .dll.s, exe's and mfcomp of the WMI .mof files and I still get the same error where I can *not* createobject on "WbemScripting.SWbemLastError". How do I get this to work ? ------------------------------------------------------------------- Example: Set WMIError = CreateObject("WbemScripting.SWbemLastError") ERROR: Unspecified error Error Code: 80004005 Source" (null)
|
|
|
|
59cobalt
-
Total Posts
:
981
- Scores: 91
-
Reward points
:
0
- Joined: 7/17/2011
-
Status: offline
|
Re:WMI - VBScript Error -- For CreateObject - WbemScripting.SWbemLastError
Sunday, January 15, 2012 11:55 AM
( permalink)
|
|
|
|
JosephB
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 1/12/2012
-
Status: offline
|
Re:WMI - VBScript Error -- For CreateObject - WbemScripting.SWbemLastError
Sunday, January 15, 2012 1:23 PM
( permalink)
Question answered. Thanks !
|
|
|
|