Search notes:

Different behaviour of environment variables in 32-bit and 64-bit processes of Windows (WOW64)

print-env-vars.bat

print-env-vars.bat is a simple cmd.exe batch file that prints the names and values of some environment variables whose value depends on the bitness of the process that is eavluating them.
@echo off

echo PROCESSOR_ARCHITECTURE  = %PROCESSOR_ARCHITECTURE%
echo PROCESSOR_ARCHITEW6432  = %PROCESSOR_ARCHITEW6432%
echo ProgramFiles            = %ProgramFiles%
echo ProgramW6432            = %ProgramW6432%
echo CommonProgramFiles      = %CommonProgramFiles%
echo CommonProgramW6432      = %CommonProgramW6432%
Github repository Windows-development, path: /WOW64/environment-variables/print-env-vars.bat

call-print-env-vars.bat

call-print-env-vars.bat is another batch file that calls the print-env-vars.bat batch file twice. The first invocation is in the context of the «current» cmd.exe process. For the second invocation, it starts a 32 bit cmd.exe process, whose executable is located under %SystemRoot\SysWOW64.
If the calling cmd.exe process is a 64-bit process, the difference of the environment variable values becomes visible.
call                              print-env-vars.bat
%systemroot%\syswow64\cmd.exe /c "print-env-vars.bat"
Github repository Windows-development, path: /WOW64/environment-variables/call-print-env-vars.bat

See also

WOW64: Windows on Windows 64 bit

Index