Hopefully "ScriptingTipsAndTricks" helps you with your batch file or vbscript scripting :-)
[Bottom][Contents][Prev]: Environment Variables (used to configure or store information)[Next]: ProgramFiles
\->Introduction->Environment Variables (used to configure or store information)->PROCESSOR_ARCHITECTURE

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.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Environment Variables (used to configure or store information)[Next]: ProgramFiles


ScriptingTipsAndTricks© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday September 07 2014 at 12:50pm
Visit ScriptingTipsAndTricks's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.