x64 applications write to the registry here:
HKEY_LOCAL_MACHINE\SOFTWARE
x32 applications on x64 are intercepted by the system and write here:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
This is transparent to the user.
(description from microsoft
http://support.microsoft.com/kb/896459)
When x32 apps read from the registry the read from here:
HKEY_LOCAL_MACHINE\SOFTWARE
but the system again intercepts and gets the values from:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
What happens if a x32 application (like an autohotkey script .ahk or compiled) tries to read from a key that belongs to a x64 application?
That the call is intercepted by the system and you get an
empty result, because it looks for it on HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
So, there is no way to read keys from HKEY_LOCAL_MACHINE\SOFTWARE with a x32 application if they were written by a x64 application.
p.e:
Maya2008 32 installed on Windows XP 32
Code:
RegRead, dirmaya, HKLM, Software\Autodesk\Maya\2008\Setup\InstallPath,MAYA_INSTALL_LOCATION
msgbox, %dirmaya%
Result:
C:\Program Files\3D\Maya2008Maya2008 64 installed on Windows XP 64
The same RegRead code
Result:
Nothing.....
Manually create in the registry a duplicate on HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node:
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Autodesk\Maya\2008\Setup\InstallPath]
"MAYA_INSTALL_LOCATION"="c:\\Program Files\\3D\\Maya2008_fake_path"
And again the same code
Result:
C:\Program Files\3D\Maya2008_fake_path