WMI“已安装"查询不同于添加/删除程序列表? [英] WMI "installed" query different from add/remove programs list?

查看:29
本文介绍了WMI“已安装"查询不同于添加/删除程序列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 WMI 获取 Windows XP 的已安装程序列表.使用 wmic,我尝试过:

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

并且我得到了许多已安装程序的列表,但是在根据添加/删除程序"显示的内容清理此列表后,我看到添加/删除程序的 GUI 中列出的程序比 WMI 查询中列出的程序多.我需要使用另一个 WMI 查询来安装其余程序吗?或者还有其他地方我需要寻找其余的吗?

and I get a listing of many of the installed programs, but after scrubbing this list against what "Add/Remove Programs" displays, I see many more programs listed in the GUI of Add/Remove Programs than with the WMI query. Is there another WMI query I need to use to get the rest of the programs installed? Or is there some other place I need to look for the rest?

此外,WMI 查询中列出的两个已安装程序不在添加/删除程序中.知道为什么吗?

Also, there are two installed programs that are listed in the WMI query that aren't in Add/Remove programs. Any idea why?

推荐答案

我相信您的语法正在使用 Win32_Product WMI 中的类.一个原因是此类只显示使用 Windows Installer 安装的产品 (见这里).卸载注册表项是您最好的选择.

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\UninstallHKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall

评论更新:

卸载注册表项是列出已安装和未安装的标准位置.它是添加/删除程序"列表用来填充应用程序列表的位置.我确信有些应用程序没有在这个位置列出自己.在这种情况下,您将不得不求助于另一种更粗略的方法,例如搜索程序文件目录或查看开始菜单程序列表.这两种方式肯定都不理想.

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.

这篇关于WMI“已安装"查询不同于添加/删除程序列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆