Est-il possible d'énumérer tous les éléments ActiveX (ou juste activés) (* .dll, * .ocx) avec le script WMI?Comment énumérer tous les éléments ActiveX avec WMI?
Motivation: ActiveXHelper
Est-il possible d'énumérer tous les éléments ActiveX (ou juste activés) (* .dll, * .ocx) avec le script WMI?Comment énumérer tous les éléments ActiveX avec WMI?
Motivation: ActiveXHelper
Scritomatic V2 outil ont un certain échantillon comme ça:
On Error Resume Next
Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20
arrComputers = Array("*") For Each strComputer In arrComputers WScript.Echo WScript.Echo "==========================================" WScript.Echo "Computer: " & strComputer WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ClassicCOMClass", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems WScript.Echo "Caption: " & objItem.Caption WScript.Echo "ComponentId: " & objItem.ComponentId WScript.Echo "Description: " & objItem.Description WScript.Echo "InstallDate: " & WMIDateStringToDate(objItem.InstallDate) WScript.Echo "Name: " & objItem.Name WScript.Echo "Status: " & objItem.Status WScript.Echo Next Next
Function WMIDateStringToDate(dtmDate) WScript.Echo dtm: WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _ Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _ & " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate,13, 2)) End Function
Pour autant que je peux dire, Win32_ClassicCOMClass n'est pas la classe qui répertorie les objets activex. Je ne peux pas trouver ma classe activex particulière ou Flash, mais l'assistant ActiveX le trouve bien. –