@echo off
REM ##############################################################################
REM
REM Windows OS detection script by Doc Rice v1.1
REM This script requires the use of OSVER.EXE from Bill Stewart at 
REM http://www.cybermesa.com/~bstewart/wast.html
REM
REM Please see http://winpatch.homeip.net for updated information.
REM
REM ##############################################################################


cls
echo Checking Windows version... 
echo.
echo.

setlocal

for /f "tokens=*" %%i in ('osver.exe') do set windowsversion=%%i

echo This operating system is %windowsversion%.
echo.

if "%windowsversion%" == "Windows NT 4.0" goto windowsnt
if "%windowsversion%" == "Windows 2000" goto windows2000
if "%windowsversion%" == "Windows XP" goto windowsxp
if "%windowsversion%" == "Windows Server 2003" goto windows2003


:windowsnt
cd "Windows NT 4.0 SP6a"
echo.
call .\patch.bat
goto end

:windows2000
cd "Windows 2000 SP3"
echo.
call .\patch.bat
goto end

:windowsxp
cd "Windows XP Professional SP1"
echo.
call .\patch.bat
goto end

:windows2003
cd "Windows 2003"
echo.
call .\patch.bat
goto end


:end