Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords:
b=RegQueryValue(@REGMACHINE, "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion[ProgramFilesDir]") Message("ProgramFiles", b) b=RegQueryValue(@REGMACHINE, "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion[ProgramFilesDir (x86)]") Message("ProgramFiles (x86)", b) Exit
Basically, all x86-64 based Windows operation systems maintain two views of the registry - a 32-bit view and a 64-bit view. By default WinBatch uses the 64-bit view. You can switch between views using the RegOpenFlags function (see the help file for details.)
The reason you are getting your results is that you are looking at the registry from the 64-bit view and the Wow6432Node part of the path is basically ignored by the underlying Windows API registry functions. So you are actually getting the values in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersioninstead.
The first rule of using registry functions on 64-bit windows is to NEVER use 'Wow6432Node' as part of a subkey name. Instead switch to the 32-bit view and use the subkey name without the 'Wow6432Node'.
Article ID: W17648
Filename: Registry Redirection.txt
File Created: 2010:01:11:12:02:52
Last Updated: 2010:01:11:12:02:52