Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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

www.waterloo-software.com


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:

  • third_party_content/community/commentary/forums_works/13ebc99d0004433d71398a500.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1