WMI - VBScript Error -- For CreateObject - WbemScripting.SWbemLastError

Author Message
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)
0
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)
 

 
#1
    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)
     
    #2
      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)
      0
      Question answered. Thanks !
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9