From LedHed's Wiki
I was writing a vbscript today that required I know what OS Architecture (x86 or x64)
I came across this site: http://csi-windows.com/toolkit/csi-getosbits
VBScript
Bits = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth
Command Line
wmic Path Win32_Processor Get AddressWidth