WMI “installed” query different from add/remove programs list?

后端 未结 13 1932
不知归路
不知归路 2020-11-29 01:56

Trying to use WMI to obtain a list of installed programs for Windows XP. Using wmic, I tried:

wmic /output:c:\\ProgramList.txt product get name,version
         


        
13条回答
  •  难免孤独
    2020-11-29 02:22

    I believe your syntax is using the Win32_Product Class in WMI. One cause is that this class only displays products installed using Windows Installer (See Here). The Uninstall Registry Key is your best bet.

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall

    UPDATE FOR COMMENTS:

    The Uninstall Registry Key is the standard place to list what is installed and what isn't installed. It is the location that the Add/Remove Programs list will use to populate the list of applications. I'm sure that there are applications that don't list themselves in this location. In that case you'd have to resort to another cruder method such as searching the Program Files directory or looking in the Start Menu Programs List. Both of those ways are definitely not ideal.

    In my opinion, looking at the registry key is the best method.

提交回复
热议问题