?
Solved

get installed program list from add or remove program using C#

Posted on 2009-04-20
3
Medium Priority
?
2,479 Views
Last Modified: 2012-05-06
i am developing a application in which i need to get the list of installted programs on windows xp, from add or remove programs. I am using C#. any idea how to do it.


thanks.
0
Comment
Question by:pixels123
2 Comments
 
LVL 18

Accepted Solution

by:
Priest04 earned 1000 total points
ID: 24185966
The list can be retrieved from registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall

Here is an example how to do this

http://www.codeproject.com/KB/system/installed_programs.aspx

Goran
0
 
LVL 1

Assisted Solution

by:yamurthy
yamurthy earned 1000 total points
ID: 24222789
Hope the code snippet helps you
public void GetInstalledApplicationList(List<string> ApplicationNames)
        {   
            RegistryKey OurKey = Registry.LocalMachine;
            OurKey = OurKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", true);
            string[] subStringNames = OurKey.GetSubKeyNames();
             
            int Count = OurKey.SubKeyCount;
            for (int Index = 0; Index < Count; Index++)
            {
                RegistryKey Key = OurKey.OpenSubKey(subStringNames[Index]);
                string ValueName = Key.GetValue("DisplayName", "").ToString();
                if (ValueName != "")
                {
                    ApplicationNames.Add(ValueName);
                }                
            }
        }

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question