I have a C # function that does something similar, it looks at both 32-bit and 64-bit registry entries. I assume that you got the correct name of the program you are looking for, all you need to do is map it to the "DisplayName" key. I doubt you will have problems with C ++ ... It will look like this
string SoftwareKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
bool found = false;
RegistryKey rk = Registry.LocalMachine.OpenSubKey(SoftwareKey);
foreach (string skName in rk.GetSubKeyNames())
{
RegistryKey sk = rk.OpenSubKey(skName);
if (sk.GetValue("DisplayName") != null &&
sk.GetValue("DisplayName").ToString().Equals("WhateverProgramYouAreLookingFor"))
{
found = true;
break;
}
}
if(!found)
{
SoftwareKey = @"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall";
foreach (string skName in rk.GetSubKeyNames())
{
RegistryKey sk = rk.OpenSubKey(skName);
if (sk.GetValue("DisplayName") != null &&
sk.GetValue("DisplayName").ToString().Equals("WhateverProgramYouAreLookingFor"))
{
found = true;
break;
}
}
}
source
share