print-env-vars.bat
@echo off
echo PROCESSOR_ARCHITECTURE = %PROCESSOR_ARCHITECTURE%
echo PROCESSOR_ARCHITEW6432 = %PROCESSOR_ARCHITEW6432%
echo ProgramFiles = %ProgramFiles%
echo ProgramW6432 = %ProgramW6432%
echo CommonProgramFiles = %CommonProgramFiles%
echo CommonProgramW6432 = %CommonProgramW6432%
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"