Hi, this is my first post here and I just want to contribute..
The "wrong" readings of the registry keys is due to the Registry Virtualization redirections implemented in Vista and later 64bit operating systems.
If you do use
Inno Setup, the solution is pretty simple: you can do the query replacing HKEY_LOCAL_MACHINE with HKLM64 which specifies it needs to query the 64bit key tree and not Wow6432node. If you use HKLM or HKEY_LOCAL_MACHINE, Windows will redirect any query to the key tree corresponding to 32bit apps even if you specify that your key to read is not in the Wow6432node.
For example, you can do your query this way:
if RegQueryStringValue(HKLM64, 'SOFTWARE\Lockheed Martin\Prepar3D v4','SetupPath', SimInstallationPath) then
YourVariableToUseLater := SimInstallationPath
Instead of:
if RegQueryStringValue(HKLM, 'SOFTWARE\Lockheed Martin\Prepar3D v4','SetupPath', SimInstallationPath) then
YourVariableToUseLater := SimInstallationPath
Or:
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Lockheed Martin\Prepar3D v4','SetupPath', SimInstallationPath) then
YourVariableToUseLater := SimInstallationPath
Where
SimInstallationPath and
YourVariableToUseLater are String variables.
I don't know if any other installers have any alternative code to solve this matter, but I think they have their own way to do that.
I hope this information provide some help.
Regards,
Erick