List Classic COM Classes

Retrieves information about all the “classic” COM classes installed on a computer.

VBScript Code


On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_ClassicCOMClass")

For Each objItem in colItems
    Wscript.Echo "Component ID: " & objItem.ComponentId
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo
Next