This can't be right but it's happening to me. I have the following function:
private static bool KeyExists(RegistryKey key, string search)
{
//GetSubKeyNames is busted...
foreach (string subKey in key.GetSubKeyNames())
{
if (subKey.Trim().Equals(search.Trim()))
{
return true;
}
}
return false;
}
If I put the line String[] names = key.GetSubKeyNames()
and have a look in the debugger, I see that the listed names are not what I see in regedit. For example I have a piece of software installed which appears in the Wow6432Node subkey but it pops up if I search for it in the normal Software subkey. Any ideas?
Thanks, brian