32bit 64bit 체크

@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"

)


Windows Version 체크

:: -------------------------------------

:: Check Windows Version

:: 5.0 = W2K

:: 5.1 = XP

:: 5.2 = Server 2K3

:: 6.0 = Vista or Server 2K8

:: 6.1 = Win7 or Server 2K8R2

:: 6.2 = Win8 or Server 2K12

:: 6.3 = Win8.1 or Server 2K12R2

:: 0.0 = Unknown or Unable to determine

:: 10.0 = Windows 10

:: --------------------------------------

:: echo OS Detection:  Starting


ver | findstr /i "5\.0\."

if %ERRORLEVEL% EQU 0 (

echo  OS = Windows 2000

)

ver | findstr /i "5\.1\."

if %ERRORLEVEL% EQU 0 (

echo OS = Windows XP

)

ver | findstr /i "5\.2\."

if %ERRORLEVEL% EQU 0 (

echo OS = Server 2003

)

ver | findstr /i "6\.0\." > nul

if %ERRORLEVEL% EQU 0 (

echo OS = Vista / Server 2008

)

ver | findstr /i "6\.1\." > nul

if %ERRORLEVEL% EQU 0 (

echo OS = Windows 7 / Server 2008R2

)

ver | findstr /i "6\.2\." > nul

if %ERRORLEVEL% EQU 0 (

echo OS = Windows 8 / Server 2012

)

ver | findstr /i "6\.3\." > nul

if %ERRORLEVEL% EQU 0 (

echo OS = Windows 8.1 / Server 2012R2

)

ver | findstr /i "10\.0\." > nul

if %ERRORLEVEL% EQU 0 (

echo OS = Windows 10

)




Posted by 혀비