How to determine OS Platform with WMI?

后端 未结 13 3313
無奈伤痛
無奈伤痛 2021-02-20 03:46

I am trying to figure out if there is a location in WMI that will return the OS Architecture (i.e. 32-bit or 64-bit) that will work across \"all\" versions of Windows. I though

13条回答
  •  独厮守ぢ
    2021-02-20 04:35

    Use the following WMI class and property - This should work on 2003/XP and Win7/2008R2

    ROOT\CIMV2\Win32_Processor
    AddressWidth
    

    From Technet:

    On a 32-bit operating system, the value is 32 and on a 64-bit operating system it is 64. This property is inherited from CIM_Processor.

提交回复
热议问题