I got a C# function that does something similar, it looks on both the 32 bit and the 64 bit entries in the registry.I'm assuming you got the right name of the program you are looking for all you need is to match it with key "DisplayName". I doubt you'd have problems making it C++...It would go something 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"))
{
//whatever you need to do with it
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"))
{
//whatever you need to do with it
found = true;
break;
}
}
}