"wmic product get name" - showing 32 bits products on 64 bits OS - use Win32_InstalledWin32Program

GowaP 1 Reputation point
2022-08-03T09:00:43.617+00:00

[EN] To list 32-bit applications on Win 64-bit with WMIC, use the following syntax (administrator privilege required):

"Wmic Path Win32_InstalledWin32Program"

Example:
wmic path Win32_InstalledWin32Program where "name like '%Office%'"get Name,Vendor,Version

The "WMIC Path Win32_Product" or "Wmin product" returns other useful properties such as "InstallDate" that is missing in "Win32_InstalledWin32Program".

----------

[FR] Pour lister avec WMIC les application 32 bits sur Win 64 bits, utilisez la syntaxe suivante (privilège administrateur nécessaire) :

« Wmic Path Win32_InstalledWin32Program »

Exemple :
wmic path Win32_InstalledWin32Program where "name like '%Office%'"get Name,Vendor,Version

Le « WMIC Path Win32_Product » ou « Wmin product » renvoie d’autres propriétés bien utile comme « InstallDate » qui manque dans « Win32_InstalledWin32Program ».

Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
437 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,651 Reputation points
    2022-08-04T07:24:54.793+00:00

    Hello,

    I would recommend the next VBS script (simple save on a .VBS file) to list separately the 32-bit and 64-bit in one run:

    Here’s some VBScript that will list first the 32-bit and then 64-bit installed applications:

    strComputer = “.” Const HKLM = &h80000002 Set objCtx = CreateObject(“WbemScripting.SWbemNamedValueSet”) objCtx.Add “__ProviderArchitecture”, 32 objCtx.Add “__RequiredArchitecture”, TRUE Set objLocator = CreateObject(“Wbemscripting.SWbemLocator”) Set objServices = objLocator.ConnectServer(“”,”root\default”,””,””,,,,objCtx) Set objStdRegProv = objServices.Get(“StdRegProv”)

    WScript.Echo “32-bit Applications” WScript.echo “——————-“

    Call GetApplications

    objCtx.Add “__ProviderArchitecture”, 64 objCtx.Add “__RequiredArchitecture”, TRUE Set objLocator = CreateObject(“Wbemscripting.SWbemLocator”) Set objServices = objLocator.ConnectServer(“”,”root\default”,””,””,,,,objCtx) Set objStdRegProv = objServices.Get(“StdRegProv”)

    WScript.Echo “64-bit Applications” WScript.echo “——————-“

    Call GetApplications

    Sub GetApplications

    ’ Use ExecMethod to call the GetStringValue method Set Inparams = objStdRegProv.Methods_(“EnumKey”).Inparameters Inparams.Hdefkey = HKLM Inparams.Ssubkeyname = “Software\Microsoft\Windows\CurrentVersion\Uninstall\”

    set Outparams = objStdRegProv.ExecMethod_(“EnumKey”, Inparams,,objCtx)

    For Each strSubKey In Outparams.snames

    Set Inparams = objStdRegProv.Methods_(“GetStringValue”).Inparameters Inparams.Hdefkey = HKLM Inparams.Ssubkeyname = “Software\Microsoft\Windows\CurrentVersion\Uninstall\” & strSubKey Inparams.Svaluename = “DisplayName” set Outparams = objStdRegProv.ExecMethod_(“GetStringValue”, Inparams,,objCtx)

    if (“” & Outparams.sValue) = “” then ‘wscript.echo strSubKey Else wscript.echo Outparams.SValue End iF

    ‘Inparams.Svaluename = “QuietDisplayName” ‘set Outparams = objStdRegProv.ExecMethod_(“GetStringValue”, Inparams,,objCtx) ‘wscript.echo Outparams.SValue

    Next

    End Sub

    --------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.