Win32Reg_AddRemovePrograms not listing all installed programs

Doing something like this:

Get-WmiObject -Class Win32Reg_AddRemovePrograms -Computer System1

Doesn’t list all the programs installed, however, if I use the registry I get them all plus a TRUCKLOAD more, not just the ones showing in Control Panel under “Programs and Features”, any clues?

Thanks

That’s just the way that particular class was written. It’s kind of always been that way. Win32_Product does the same thing - it’s due in part to the fact that different applications register themselves differently, and ones not in the Windows Installer database will usually be missed.

It is highly recommended that you do NOT use WMI to get installed software. Check out the following blog:

https://blogs.technet.microsoft.com/heyscriptingguy/2013/11/15/use-powershell-to-find-installed-software/

There are other blogs out there that go into detail of all the reasons NOT to use Win32_Product or other repositories.

Hi,

I’m not using Win32_Product, that’s a no-no, but Win32Reg_AddRemovePrograms, and apparently getting installed software still remains tricky.

Thanks guys.

The most reliable method, generally speaking, is to query the registry directly looking for uninstall strings. Most applications will register some kind of uninstall string to allow users to uninstall the software via Control Panel, so you can follow the breadcrumbs from there. :slight_smile:

Indeed, using the registry seems the way to go, however, is also annoying since you get a list of software NOT listed in Control Panel (e.g. Windows updates)

You can check with PackageManagement and perform some filtering. It might help you out.

Actually that’s a great idea, however, it requires PSRemoting and in my environment the All-knowing-all-wise Security Team frown upon that, don’t ask me why.

But thank you for that tip.

Using win32_Product is not recommended as Rob mentioned. I would echo what Joel mentioned , you can browse through registry and is the most successful approach ever for this.I suggest iterating trough both 64bit and 32bit paths.

You can use this script form TechNet script repository.

My script works fine and I’m using the registry, I get all the installed software, my question was only if there was a way to improve the results, meaning, to show only the same software listed in Control Panel, the cmdlet Get-Package can be used but not without having PSRemoting enabled.