%ProgramFiles% differences on 64bit Windows

view full story

http://serverfault.com – From a command prompt, I get the following: >echo %ProgramFiles% C:\Program Files However, some applications (PHP in this instance, though I've seen the same behavior from within Apache's httpd.conf), it is: >php -r "echo $_ENV['ProgramFiles'];" C:\Program Files (x86) Why is this? Background: I'm developing scripts that are agnostic of the host OS being 32bit or 64bit, and for configuration files this works great. On a 32bit system, %ProgramFiles% is "C:\Program Files", and on a 64bit system that same %ProgramFiles% seemingly returns C:\Program Files (x86). I'm just curious why th (HowTos)