Find the OS architecture from the command line. Oh, how many ways are there to do this? 10-15? Maybe more, here is the the easy one, from the command line type "SET PR"
Windows 10 - X64
Windows 2003 - X86
Other ways, just for a laugh (I googled these):
Windows 10 - X64
Windows 2003 - X86
Other ways, just for a laugh (I googled these):
1:
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
if %OS%==32BIT echo This is a 32bit operating system
if %OS%==64BIT echo This is a 64bit operating system
2:
:CheckOS
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo 64-bit...
GOTO END
:32BIT
echo 32-bit...
GOTO END
:END
3:
*** Start ***
@echo off
Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
REG.exe Query %RegQry% > checkOS.txt
Find /i "x86" < CheckOS.txt > StringCheck.txt
If %ERRORLEVEL% == 0 (
Echo "This is 32 Bit Operating system"
) ELSE (
Echo "This is 64 Bit Operating System"
)
*** End ***
4:
wmic os get osarchitecture
5:
(set | find "ProgramFiles(x86)" > NUL) && (echo "%ProgramFiles(x86)%" | find "x86") > NUL && set bits=64 || set bits=32
6:
echo %PROCESSOR_ARCHITECTURE%
7:
check for the presence of
%SYSTEMROOT%\Program Files(x86)
8:
systeminfo | findstr /I type:
9:
Start-> Run -> winmsd.exeUnder "System Summary"/ System Type you can find the OS version
X64 -> 64 Bit
X86 -> 32 Bit
10:
:arch
set p | findstr /i AMD64 > nul
if not errorlevel 1 goto no64
goto eof
:no64
code to execute
:eof