Problem is that in my case, a batch file run from 32 bit application have %ProgramFiles% expanding to "C:\Program Files (x86)".
Windows – How to get 64 bit %ProgramFiles% in batch file that is run from 32 bit application
64-bitbatchwindows
64-bitbatchwindows
Problem is that in my case, a batch file run from 32 bit application have %ProgramFiles% expanding to "C:\Program Files (x86)".
Best Answer
You can get it from environment variable
%ProgramW6432%
. This variable exists on 64-bit Windows versions and always points to 64-bit instance ofProgram Files
.