I need to get the list of installed softwares on remote Windows hosts using wmi
calls. I have tried using Win32_Product
and Win32Reg_AddRemovePrograms
Classes.
Advantage of using Win32_Product
is that, it displays all the softwares installed on the machine, but it is very very slow and does not work on more than 90% hosts (giving errors like- NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
). On the other hand, Win32Reg_AddRemovePrograms
is much quicker and works pretty well on most of the hosts, but misses plenty of softwares.
Is there any other Win32 Class that could do the same efficiently?
The encoded version in c# that is based on the readings in the system registry windows.
You can use wmic.
Example:
Or you can do it like the "Add/Remove Programs", reading all uninstall registry keys:
On 64 bit Windows, remember to also check:
To returns a list of all software installed on a computer, whether or not by Windows-Installer: