Using RegistryKey in C# I'm trying to find a specific software in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
But even though I pass this path to SubKey, I get back this path instead:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
Code:
public void GetSubKeys(RegistryKey SubKey)
{
List<string> viList = new List<string>();
string[] val = SubKey.GetSubKeyNames();
foreach (var VARIABLE in val)
{
RegistryKey SubKey1 = SubKey.OpenSubKey(SubKey + @"\" + VARIABLE);
if (SubKey1.ToString().Contains("MySw"))
{
viList.Add(VARIABLE);
}
}
}
I know that because I'm searching for a specific SW which is not located in the WOW6432Node
registry key, but in the other key, and there are various sw which are shown in the WOW6432Node
key and not in the first key...
How come?
Any ideas?