Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WMI Classes Empty?

Status
Not open for further replies.

BoostMR2

IS-IT--Management
Jul 20, 2007
33
0
0
US
I have a web app that connects to client computer using full administrative privileges via WMI. It specifically pulls the "root\CIMV2\Applications\MicrosoftIE" directory, MicrosoftIE_ConnectionSettings class. On most machines, it returns all the available data, including items with no value.

On some machines, however, it does not. I have a test VBScript that has the same exact issue as my website code (c#).

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2\Applications\MicrosoftIE")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM MicrosoftIE_ConnectionSettings",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "MicrosoftIE_ConnectionSettings instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "IPAddress: " & objItem.IPAddress
Next

It literally returns nothing. Not even the scripted output that isn;t a variable, just text, is written, so the colItems object is obviously empty. I don't think the class is missing because there is no error. I believe the class is there, just completely empty. I'm still surprised, however, that it doesn't give any error since the script/site pull specifically "objItem.IPAddress" as seen above. This goes for ANY attribute in this class.

Google searches have yielded nothing.

All computers are running windows XP SP2 with some version of Internet Explorer 6.0, and .net framework 1.2 or higher.
 
Update: I added code to the script to output soemthing after:
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2\Applications\MicrosoftIE")

and also after:
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM MicrosoftIE_ConnectionSettings",,48)
No errors, and i see the output. This verifies the MicrosoftIE_ConnectionSettings class is being pulled, but nothing is in it. I guiess technically speaking, all of it's attribute must be null. This is wierd though, because on the same machines, If you open IE, all of the settings are there (of course). I can't make sense of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top