How can I determine if the current version of Windows is either 32-bit or 64-bit from the command line? [duplicate]

What's the command line to find out if the OS is running a 32-bit version or 64-bit of Windows?


Solution 1:

You can get this via WMI:

wmic OS get OSArchitecture

Example on my system:

C:\>wmic OS get OSArchitecture
OSArchitecture
32-bit

Solution 2:

Command line:

systeminfo | findstr /I type:

example output:

System type:               X86-based PC

X86 indicates a 32-bit system in this example.

(/I parameter indicates case-insensitive search)