\
Introduction
Environment Variables (used to configure or store information)
PROCESSOR_ARCHITECTURE
This environment variable can be used to tell you if you are running on a 32
or 64 bit version of Windows.
The value may vary depending on how the process was started for example
on my 64 bit Intel workstation, if I run "cmd.exe" via the "Run" start menu
option the variable contains "AMD64", if I run it via a ObjectDock (32 bit pgm)
shortcut it returns "x86".
I'm not sure why this is as both processes were
"C:\Windows\System32\cmd.exe", yet SysInternal's Process Explorer tool
clearly shows one as a 32 bit image and the other as 64.
If you want to know if the OS is 64 bit rather than which mode you are
processing under then its probably better to look for the
"ProgramFiles(x86)" environment variable which only exists
on a 64 bit OS.