开发者

Duplicate entries in uninstall registry key when compiling list of installed software

I'm trying to compile a list of installed software on a workstation. After some research I settled on using the information from the following registry key to compile the list.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

It has been a good source and it also lists items that are not listed using Win32_Products WMI Class. One quirk I've come across is that there are some "duplicate" entries with same display name recorded under different registry key. For example, here are the keys for Windows Media Player:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Windows Media Player]
"DisplayName"="Windows Media Player 11"
"UninstallString"="\"C:\\Program Files\\Windows Media Player\\Setup_wm.exe\" /Uninstall"
"DisplayIcon"="C:\\Program Files\\Windows Media Player\\wmplayer.exe"
"ParentKeyName"=""
"ParentDisplayName"=""
"NoModify"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\wmp11]
"DisplayName"="Windows Media Player 11"
"UninstallString"="\"C:\\WINDOWS\\$NtUninstallwmp11$\\spuninst\\sp开发者_JS百科uninst.exe\""
"TSAware"=dword:00000001
"NoModify"=dword:00000001
"InstallDate"="20090325"
"Publisher"="Microsoft Corporation"
"NoRepair"=dword:00000001
"HelpLink"="http:"
"URLInfoAbout"="http:"
"SystemComponent"=dword:00000001

There are similar ones also and others where one of the entry is the GUID of the app. I've read that this is due to the different methods applications and patches are deployed. Is this true? More importantly,

  • Which of the two entries are valid? (or more valid?)
  • Which one does the Add/Remove Program list use?
  • Are the information from two keys merged? If so, how?
  • Any other tips/hints/suggestions?

Thank you!!


I've found an answer to this. Although not sure if it'll be 100% correct. Second, registry key above has "SystemComponent"=dword:00000001" registry value. This value is used to hide items from ARP (Add/Remove Programs). I can ignore any registry key containing this value. It seems to work so far. The second registry key does contain some useful information, so I'm not sure how that can be merged yet but it's ok for the list so far.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜