Consulting

Results 1 to 2 of 2

Thread: Solved: WMI and Missing ProgID's

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    Solved: WMI and Missing ProgID's

    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

  2. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •