OSのバージョン取得
文字の抜き出しを利用することでOSのバージョンを調べることが出来ます。
if "%userprofile%"=="" goto END for /f "tokens=1-3" %%i in ('ver') do set os=%%k