PDA

View Full Version : Solved: WMI and Missing ProgID's



stanl
06-14-2006, 05:41 AM
I am updating a script which will check a PC for installed COM Objects and other Progids. It depends upon a WMI query

"SELECT * FROM Win32_ProgIDSpecification"

from which I cull missing Captions, invalid ChecID fields and lookup the CSLID from the Progid.

Works great but does not collect MDAC or OWC component ProgID's, ie. ADODB.Recordset

Outside the possibility that WMI is itself an ADODB.Recordset and the issue is forest-trees, why are these missing from the query?
Stan



'the actual script is more complex
'but the query is something like
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_ProgIDSpecification")
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Check ID: " & objItem.CheckID
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "Parent: " & objItem.Parent
Wscript.Echo "ProgID: " & objItem.ProgID
Next

stanl
06-14-2006, 04:41 PM
It appears WMI is not very inclusive with this class. It actually finds about 700 of the over 4700 ProgIDs on my laptop. Went back to a straight Registry enumeration which gets what I want so I'll mark this solved.
Stan