Client Automation - Any Versions.
In a 64-bit version of Windows the %WinDir%\System32 folder is reserved for 64-bit applications.
When a 32-bit application tries to access the System32 folder, access is by default redirected to the following folder:
As a workaround, 32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32.
WOW64 (windows 32 on windows 64) recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access.
So e.g. %WINDIR%\System32\oobe\info can be accessed from %WINDIR%\sysnative\oobe\info
See http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx for more details.
%ProgramFiles% indeed points to "C:\Program Files (x86)"
If you want to address C:\Program Files, use the ProgramW6432 environment variable.
Tip: start a 32bit command box within Windows x64 by running %windir%\SysWoW64\cmd.exe so you can easily check the values of the environment variables and verify which folders are directly accessible and which are redirected.
Finally, if you want to address the 64bit registry keys from a dmscript without being redirected, please refer to the following techdoc: