64-bit (OpenInsight 32-bit)
At 11 JUN 2012 09:29:15PM Jim Vaughan wrote:
Is any code available to check to see if you are running under a 64-bit O/S?
Jim R Vaughan
At 12 JUN 2012 04:27PM Jared Bratu wrote:
You can use this code.
*Use WMI to retrieve the Windows bit level. *Adapted from http://csi-windows.com/toolkit/csi-getosbits obj = OleCreateInstance("WbemScripting.SWbemLocator") WMIObj = OleCallMethod(obj, "ConnectServer", ".", "root\cimv2") ArchObj = OleCallMethod(WMIObj, "Get", "Win32_Processor='cpu0'") *Returns 32 or 64 depending on OS - not CPU architecture. bits = OleGetProperty(ArchObj, "AddressWidth" )Keep in mind you can run a 32bit OS on 64bit hardware. This appears to reliably return the architecture of the OS and not the hardware.
At 12 JUN 2012 04:44PM Jim Vaughan wrote:
Perfect, thank you.
Jim R Vaughan