Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @echo off
  2. :CheckOS
  3. IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO ABORT)
  4. :64BIT
  5. setlocal
  6. for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
  7. REM Windows 7
  8. if "%version%" == "6.1" (GOTO W7) ELSE (GOTO ABORT)
  9. REM Windows 8
  10. if "%version%" == "6.2" (GOTO W10) ELSE (GOTO ABORT)
  11. REM Windows 8.1
  12. if "%version%" == "6.3" (GOTO W10) ELSE (GOTO ABORT)
  13. REM Windows 10
  14. if "%version%" == "10.0" (GOTO W10) ELSE (GOTO ABORT)
  15. echo %version%
  16. endlocal
  17. :W7
  18. echo W7 OK
  19. exit
  20. :W10
  21. echo w8, w8.1 or w10 OK
  22. exit
  23. :ABORT
  24. echo OS not compatible
  25. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement