I have developed a 32 bit application (build for x86) which will later be deployed in 64 bit machine. I have set some configuration in registry so when application starts in 32 bit machine there is no problem reading its value but when deployed in 64 bit machine I can not read value properly as the path of the Registry is changed. To make things clear, in 32 bit machine I have registry as following
[HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication\InstallationPath] "folder"="C:\Program Files\MyApplication"
But When I look at 64 bit machine, this is shifted to
[HKEY_LOCAL_MACHINE\SOFTWARE*Wow6432Node*\MyApplication\InstallationPath] "folder"="C:\Program Files\MyApplication"
Inside my application I have to query the value of installation path the obvious thing I have done is Query the value with the Hard coded string "HKLM\SOFTWARE\MyApplication\InstallationPath", but which is not valid for x64 bit machine, Please write your thoughts how to overcome this problem.