Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :CheckOS
- IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO ABORT)
- :64BIT
- setlocal
- for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
- REM Windows 7
- if "%version%" == "6.1" (GOTO W7) ELSE (GOTO ABORT)
- REM Windows 8
- if "%version%" == "6.2" (GOTO W10) ELSE (GOTO ABORT)
- REM Windows 8.1
- if "%version%" == "6.3" (GOTO W10) ELSE (GOTO ABORT)
- REM Windows 10
- if "%version%" == "10.0" (GOTO W10) ELSE (GOTO ABORT)
- echo %version%
- endlocal
- :W7
- echo W7 OK
- exit
- :W10
- echo w8, w8.1 or w10 OK
- exit
- :ABORT
- echo OS not compatible
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement