Hi I'm trying to read a registry value that gives me the path to firefox.exe. This is stored under
HKEY_LOCAL_MACHINESOFTWAREMozillaMozilla Firefox 3.0.10in
(the version number can be found somewhere else)
But I cant seem to get RegOpenKeyEx to return ERROR_SUCCESS for anything under
HKEY_LOCAL_MACHINE
so this test fails:
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("\SOFTWARE"),0,KEY_QUERY_VALUE,&keyHandle) == ERROR_SUCCESS)
while this test passes:
if(RegOpenKeyEx(HKEY_CLASSES_ROOT,TEXT("\Shell"),0,KEY_QUERY_VALUE,&keyHandle) == ERROR_SUCCESS)
See Question&Answers more detail:os