Click here to Skip to main content
14,775,888 members
Articles » Languages » C# » Utilities
Posted 6 Jun 2014


21 bookmarked

Get List of Installed Applications of System in C#

Rate me:
Please Sign up or sign in to vote.
5.00/5 (12 votes)
6 Jun 2014CPOL
How to list the installed applications of your system and their setup details in C# language


In this tip, we will explain how to list the installed applications of your system and their setup details in C# language.


This tip is based on a Registry key whose address is HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall and you can find there many subkeys which help us to have different details of installed applications.

Using the Code

So for doing what we want, we must follow the steps given below:

  1. Add a listviewer and a button to your design form.
  2. We want use "RegistryKey" class, so add "using Microsoft.Win32" to your project usings.
  3. Put this code in your button click event:
    string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
                using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
                    foreach (string skName in rk.GetSubKeyNames())
                        using (RegistryKey sk = rk.OpenSubKey(skName))
                                var displayName = sk.GetValue("DisplayName");
                                var size = sk.GetValue("EstimatedSize");
                                ListViewItem item;
                                if (displayName != null)
                                    if (size != null)
                                        item = new ListViewItem(new string[] {displayName.ToString(), 
                                        item = new ListViewItem(new string[] { displayName.ToString() });
                            catch (Exception ex)
                            { }
                    label1.Text += " (" + lstDisplayHardware.Items.Count.ToString() + ")";

    Explanation: In this code, at first, we defined a registry command in a specific address (uninstallKey). Then, we use DisplayName and EstimatedSize subkeys which show us Name and Size of all installed apps, and at the end, the result will be shown in listviewer.

  4. You can use all subkeys in the below list:
    Value / Windows Installer property
    DisplayName ==> ProductName property
    DisplayVersion ==> Derived from ProductVersion property
    Publisher ==> Manufacturer property
    VersionMinor ==> Derived from ProductVersion property
    VersionMajor ==> Derived from ProductVersion property
    Version ==> Derived from ProductVersion property
    HelpLink ==> ARPHELPLINK property
    HelpTelephone ==> ARPHELPTELEPHONE property
    InstallDate ==> The last time this product received service. 
    The value of this property is replaced each time a patch is applied or removed from 
    the product or the /v Command-Line Option is used to repair the product. 
    If the product has received no repairs or patches this property contains 
    the time this product was installed on this computer.
    InstallLocation ==> ARPINSTALLLOCATION property
    InstallSource ==> SourceDir property
    URLInfoAbout ==> ARPURLINFOABOUT property
    URLUpdateInfo ==> ARPURLUPDATEINFO property
    AuthorizedCDFPrefix ==> ARPAUTHORIZEDCDFPREFIX property
    Comments ==> Comments provided to the Add or Remove Programs control panel.
    Contact ==> Contact provided to the Add or Remove Programs control panel.
    EstimatedSize ==> Determined and set by the Windows Installer.
    Language ==> ProductLanguage property
    ModifyPath ==> Determined and set by the Windows Installer.
    Readme ==> Readme provided to the Add or Remove Programs control panel.
    UninstallString ==> Determined and set by Windows Installer.
    SettingsIdentifier ==> MSIARPSETTINGSIDENTIFIER property


Note: Also, you can have this method in your code instead of the above code:

      string[] row = { sk.GetValue("DisplayName").ToString() , 
      var listViewItem = new ListViewItem(row);

catch (Exception ex)
    { }

Now you build your program!

Image 1


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Amir Mohammad Nasrollahi
Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

Comments and Discussions

Questionif registry is locked then? Pin
Member 128073539-Mar-17 1:08
MemberMember 128073539-Mar-17 1:08 
QuestionNeeds a second registry location for 64-bit OSes Pin
jfos15-Jun-14 14:44
Memberjfos15-Jun-14 14:44 
QuestionYou may not have registry permissions Pin
FatCatProgrammer6-Jun-14 4:34
MemberFatCatProgrammer6-Jun-14 4:34 
GeneralThank you Pin
Emre Ataseven6-Jun-14 4:11
professionalEmre Ataseven6-Jun-14 4:11 
AnswerRe: Thank you Pin
Amir Mohammad Nasrollahi6-Jun-14 4:19
MemberAmir Mohammad Nasrollahi6-Jun-14 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.