Is there any way of scanning and querying installed software on Windows faster than using WMI?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you have enough permissions, you may scan the local registry. Pertinent entries should be:
- HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
An example follows:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7BF61FA9-BDFB-4563-98AD-FCB0DA28CCC7}]
"Comments"=""
"DisplayVersion"="8.0.1557"
"InstallDate"="20131119"
"Publisher"="Microsoft Corporation"
"DisplayName"="IIS 8.0 Express"
Iterate through each Child, and extract the desired information (DisplayName
, for example.)