I would like to get a list of all the programs that are installed on the computer and display in a DataGridView with (C # Windows Forms Application).
I would like to get a list of all the programs that are installed on the computer and display in a DataGridView with (C # Windows Forms Application).
You can get the list of installed programs by reading the Windows SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall registry entries, as follows:
string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using(Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key))
{
foreach(string subkey_name in key.GetSubKeyNames())
{
using(RegistryKey subkey = key.OpenSubKey(subkey_name))
{
Console.WriteLine(subkey.GetValue("DisplayName"));
}
}
}
Adapted from StackOverflow's link .