I am trying to get a list of installed application keys:
RegistryKey RegKeyUninstallList = Registry.LocalMachine;
string strUninstallList = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
string[] test = RegKeyUninstallList.OpenSubKey(strUninstallList).GetSubKeyNames();
I get only keys from:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Windows \ CurrentVersion \ Uninstall
But I also need the keys to:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall
My program should work on 64Bitand by machine 32Bit.
edit: Ok I tried Check if the application is installed in the registry and the solution is from tHiNk_OuT_oF_bOx.
But nothing solved the problem!
The problem is that I get exactly the same list for test and test2:
RegistryKey RegKeyUninstallList = Registry.LocalMachine;
string strUninstallList = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
string strUninstallList2 = @"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall";
string[] test = RegKeyUninstallList.OpenSubKey(strUninstallList).GetSubKeyNames();
string[] test2 = RegKeyUninstallList.OpenSubKey(strUninstallList2).GetSubKeyNames();
source
share