There are multiple ways to check whether a Windows computer is running 32-bit OS or of 64-bit one.
Check 32 or 64 bit using WMIC
You can get to know the OS architecture by running the below simple command.
wmic os get OSArchitecture
Example:
c:\>wmic os get OSArchitecture OSArchitecture 64-bit c:\>
Using program files folder:
If you have a separate program files folder for x86 applications(named Program Files(x86) ) then we can infer that you are running X64 Windows on your computer.
Few things to note:
- You can run X64 based Windows OS only on 64-bit computer. If your computer is of 32-bit then the software(Windows OS or any other applications) running on your computer must be of 32-bit only.
- If your computer is of 64-bit, then it does NOT mean that you have 64-bit OS. You can run either 32-bit OS or 64-bit OS on a 64-bit computer.
- Even if you are running 64-bit OS, you can still install 32-bit applications on your computer. All the 32-bit applications are installed to a separate folder named “C:\Programs Files(x86)“.
What is the equivalent of msinfo32 for 64-bit Windows ?
There’s no separate msinfo32 for 64bit windows. The same command works in both 32 bit and 64 bit windows.
betterway:
echo %PROCESSOR_ARCHITECTURE%
That’s not actually a better way. The %PROCESSOR_ARCHITECTURE% environment variable is based upon whether or not you are running a 32 or 64 bit process. For instance if you start the command prompt from the system32 directory on a 64-bit OS the variable will return “AMD64”. However if you start the command prompt from the SysWOW64 directory that variable will return “x86.” Both of these command prompts return “64-bit” when you query WMI. So the WMIC result is actually a more accurate tool for detecting a 64-bit OS.
It is easier, but it’s not necessarily better.
Querying the registry or WMI is a *little* slower, but more definitive.
-ASB
IF /I “%PROCESSOR_ARCHITECTURE%” EQU “X86” (
IF /I “%PROCESSOR_ARCHITEW6432%” EQU “AMD64” (
SET OSARCH=X64
ECHO This is a 64-bit Architecture running in 32-bit mode.
) ELSE (
SET OSARCH=X86
ECHO This is a 32-bit Architecture running in 32-bit mode.
)
) ELSE (
SET OSARCH=X64
ECHO This is a 64-bit Architecture running in 64-bit mode.
)