@echo off
Title Check Windows Version
for /f "tokens=4-7 delims=[.] " %%i in ('ver') do (if %%i==Version (set v=%%j.%%k) else (set v=%%i.%%j))
if "%v%" == "10.0" set "myOS=Windows 10"
if "%v%" == "6.3" set "myOS=Windows 8.1"
if "%v%" == "6.2" set "myOS=Windows 8"
if "%v%" == "6.1" set "myOS=Windows 7"
if "%v%" == "6.0" set "myOS=Windows Vista"
if "%v%" == "5.2" set "myOS=Windows XP" & REM WinXP 64Bit Edition
if "%v%" == "5.1" set "myOS=Windows XP"
if "%v%" == "5.0" set "myOS=Windows 2000"
cls
echo Current OS version: %myOS%
pause >NUL
@exit /B