How can I use VBScript to determine whether I am running a 32-bit or 64-bit Windows OS?

前端 未结 8 524
死守一世寂寞
死守一世寂寞 2020-12-25 08:46

How do i detect the bitness (32-bit vs. 64-bit) of the Windows OS in VBScript?

I tried this approach but it doesn\'t work; I guess the (x86) is causing some problem

8条回答
  •  悲&欢浪女
    2020-12-25 09:40

    Came up against this same problem at work the other day. Stumbled on this genius piece of vbscript and thought it was too good not to share.

    Bits = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth
    

    Source: http://csi-windows.com/toolkit/csi-getosbits

提交回复
热议问题