daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. rem Check Windows Version
  3. echo You are on ...
  4. for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
  5. if "%version%" == "5.1" echo Windows XP
  6. if "%version%" == "6.0" echo Windows Vista.
  7. if "%version%" == "6.1" echo Windows 7.
  8. if "%version%" == "6.2" echo Windows 8.
  9. if "%version%" == "6.3" echo Windows 8.1
  10. if "%version%" == "10.0" echo Windows 10.
  11.  
  12. echo OS version %version%
  13. echo.
  14.  
  15. REM SET Value based on OS VERSION
  16. IF %version% LSS 6.1 (
  17.   rem user is using vista or older os
  18.   rem CODE HERE
  19.  
  20.   ) ELSE (
  21.   rem user is using Win 7 or newer os
  22.   rem CODE HERE
  23.  
  24.   )
  25.  
  26. pause
RAW Paste Data
Top