HOW TO GET INSTALLED BROWSER IN MY LOCAL MACHINE TO USING REGISTRY

Anupam Mishra

Total Post:135

Points:949
Posted by  Anupam Mishra
C#  .NET 
C#
 436  View(s)
Ratings:
Rate this:
I want to programatically, retrieve how many browser installed in my computer.Please give me a solution using registry key.
thank you.
  1. Anupam Mishra

    Post:135

    Points:949
    Re: How to get installed browser in my local machine to using registry

    All kind of system related information will be present in Registry. We are also open regedit, we may find various HKEY. For checking browser we go through this path:

    " HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet"

    We can find many folders inside this location, in which the name of the folder will be encrypted. Those folders indicates the installed application in the current machine.

    In each folder there will be many key and data pair of values. In that you can find DisplayName and DisplayVersion. 

    Here, we using registry class to find how many browser installed in my client machine:

    static void Main(string[] args)
            {
                RegistryKey browserKeys;
               browserKeys = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WOW6432Node\Clients\StartMenuInternet");
                if (browserKeys == null)
                    browserKeys = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Clients\StartMenuInternet");
                string[] name = browserKeys.GetSubKeyNames();
                foreach (string item in name)
                {
                    string[] strsplit = item.Split(new[] { ".EXE", ".exe" }, StringSplitOptions.RemoveEmptyEntries);
                    Console.WriteLine(strsplit[0]);
                }
                Console.ReadKey();
            }

    Output:



Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!