C++ Code to Show all Installed Programs on Windows
There are many codes to list all programs installed on windows.
Most frequently seen is:
Listing all keys in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall.
Win32_Product WMI (Windows Management Instrumentation) class.
However, none of these is clean way to obtain all the softwares. By all, I mean all the software listed in Control Panel > Programs > Programs and Features > Uninstall or change a Program.
One of the answers showed some code on some VB forum, which works out and is able to show the same programs as listed in Control Panel. Though I don't understand why that answer has only one vote up (I did it). But this code is the best I ever see.
However, it is written in VB, not so popular language.
I ported here using C++.
- Using the standard method to access Wow6432Node.
- More Informations are collected, InstallLocation, Icon and Architecture of the binary (X86 or X64).
- Qt Wrapper.
- Icon is extracted from the icon path, and stored in QPixmap.