简体   繁体   中英

Enumerate applications installed on windows in C++

I Want to list all the installed applications in c. We can do it using two ways. 1. Using Uninstall registry and 2. WMI and Win32_product class.

But is it reliable using registry for enumerating installed product? Also WMI only lists product installed through MSI installer? is there another way to do it? if not which is the best and recommended way?

Your intuitions are correct, iterating the registry is the most complete way to find out which programs are 'installed'. Obviously this will not find stand-alone binaries/applications which do not register themselves with the windows registry.

See WMI "installed" query different from add/remove programs list?

Rob Haupt's Answer links to some code for inspecting the registry

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM