I try to get a list of installed application keys:
RegistryKey RegKeyUninstallList = Registry.LocalMachine;
string strUninstallList = @"SOFTWAREMicrosoftWindowsCurrentVersionUninstall";
string[] test = RegKeyUninstallList.OpenSubKey(strUninstallList).GetSubKeyNames();
I get only the Keys from:
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall
But I need also the Keys from:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall
My program should be able to run on a 64Bit
and on a 32Bit
machine.
edit: Ok I have tried Check if application is installed in registry and the solution from tHiNk_OuT_oF_bOx.
But nothing has solved the Problem!
The problem is i get exactly the same list for test and test2:
RegistryKey RegKeyUninstallList = Registry.LocalMachine;
string strUninstallList = @"SOFTWAREMicrosoftWindowsCurrentVersionUninstall";
string strUninstallList2 = @"SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall";
string[] test = RegKeyUninstallList.OpenSubKey(strUninstallList).GetSubKeyNames();
string[] test2 = RegKeyUninstallList.OpenSubKey(strUninstallList2).GetSubKeyNames();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…