Tuesday, January 25, 2011

How to read Installed application path from the Registry in c#.net?

Suppose you have installed an application namely Fewlines4Biju and you want to read the installed path from the Registry. Then Here is the code that might be helpful.

RegistryKey regKey, regSubKey;
 regKey = Registry.CurrentUser;
 regKey = regKey.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey
            string totalPath = regKey.GetValue("Manifest").ToString();
It will give the installed path.