Get list of applications installed on your computer

Asked

Viewed 1,095 times

0

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).

  • 2

    http://stackoverflow.com/questions/908850/get-installed-applications-in-a-system

  • Hello. You’ll get more answers, and faster, if it’s clearer. What exactly do you need? Here at Sopt, the more accurate your question is, the more results you get.

1 answer

2


You can get the list of installed programs by reading the registry entries SOFTWARE Microsoft Windows Currentversion Uninstall windows, 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 the response https://stackoverflow.com/a/908907/1639385 of Stackoverflow in English.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.