There are various methods to find installed applications on the system but to my knowledge none returns exactly the same list as control panel item Add Remove Programs. Some of the ways I tried are:
- WMI via Win32_Product and Win32Reg_AddRemovePrograms
- Registry, both x32 and x64 branches
For instance, I have 217 entries in AR and
gwmi Win32_Product
returns 261 items.
gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | ? {![string]::IsNullOrWhiteSpace($_.DisplayName) } | select DisplayName
returns 119 items.
(gwmi Win32Reg_AddRemovePrograms) + (gwmi Win32Reg_AddRemovePrograms64) | sort DisplayName -Unique
returns 107 items.
I tried to nail it down with more complex filter that included InstallLocation
, InstallSource
, InstallDate
etc without success.
To me, this is an unfortunate case of Conway's Law. Windows is a very complex OS with decades of history and a huge number of moving parts. What this means is that something that seems simple, like asking the question "wtf all is installed on my computer?" is unfortunately made very complicated. The thing that makes "installed software" complicated is that it comes from several different sources. There's 64 bit software, and 32 bit software, and software that's only installed for certain users, and software that's installed for all users, and software that was installed or assigned to you via Group Policy, and more.
Fortunately, Sysinternal's Process Monitor can reveal them all to you. Just fire it up, monitor registry events, and then click the Add/Remove Programs control panel applet yourself, and see what Windows is doing in the background.
It reads from many different sources:
And more!
On one hand it is possible to see exactly what sequence of registry queries is required to precisely rebuild what you see in "Add/Remove Programs," which is a "view" based on the currently logged on user, etc. On the other hand, I think you will quickly come to the realization that it's a lot of work and that maybe reconstructing an exact view of Add/Remove Programs was maybe not that important to you in the first place. :)