Senoc@tg says to OwO
for /f "token=1,3" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName') do ( if "%%i"=="ProductName" set OS=%%~j )