I am using a vbscript to determine the cpu architecture.
When the compiled script is running in 32 bits mode, the result will always be 32 bits. Even if the script is running on a 64 bits machine.
I don't know if it's possible to create one executable that can run on both machines, and still get the right result.
I am running a 64-Bit OS and the following code seems to work for me :
Function Extract_OSBit(oWMI)
On Error Resume Next
Set colCPU = oWMI.InstancesOf("Win32_Processor")
strOutput=""
For Each objCPU in colCPU
strOutput = objCPU.AddressWidth
Extract_OSBit = strOutput
Next
End Function