using (RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", false))
{
if (key != null)
{
foreach (string keyName in key.GetSubKeyNames())
{
using (RegistryKey key2 = key.OpenSubKey(keyName, false))
{
if (key2 != null)
{
string softwareName = key2.GetValue("DisplayName", "").ToString();
if(softwareName == "softName")
{
messageBox.show("OK");
}
}
}
}
}
}