i have this code to check if .net installed , and it work very good
string key;
bool data = false;
try
{
key = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Uninstall").GetValue("50727").ToString();
}
catch (Exception)
{
}
data = (key == "50727-50727");
label1.text = "installed";
i tried to used same code with change the location for anothor apps but it faild
32bit system
string key1;
bool data1 = false;
try
{
key1 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Wow6432Node").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Uninstall").OpenSubKey("Mozilla Firefox 38.0.1 (x86 en-GB)").GetValue("DisplayName").ToString();
}
catch (Exception)
{
}
data1 = (key1 == "Mozilla Firefox 38.0.1 (x86 en-GB)");
label10.Text = "Mozilla Firefox - " + data1.ToString();
64bit system
string key1;
bool data1 = false;
try
{
key1 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Windows").OpenSubKey("CurrentVersion").OpenSubKey("Uninstall").OpenSubKey("Mozilla Firefox 38.0.1 (x86 en-GB)").GetValue("DisplayName").ToString();
}
catch (Exception)
{
}
data1 = (key1 == "Mozilla Firefox 38.0.1 (x86 en-GB)");
label10.Text = "Mozilla Firefox - " + data1.ToString();
any idea ?