I am trying to get the path to an environment variable ProgramFilesthat should expand to C:\Program Files (x86)by machine x64and to C:\Program Filesby machine x86.
The problems are that in the nmake file, if I do this:
all:
echo $(PROGRAMFILES)
It will expand to C:\Program Filesevery time, and it is wrong.
Environmental Information from x64 machine:
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
:: this one is special, if will return different results based on current process x86/x64
ProgramFiles=C:\Program Files (x86) or C:\Program Files
PROCESSOR_ARCHITECTURE=x86 or x64
Now an updated question , how to get the location of x86 program files inside nmake, so this will work on both x86 and x64 machines ?
sorin source
share