Hi,
I am a little new to creating batch files, essentially I want the script below to run a menu, if the user presses 1 they are taken to a setup.exe. If they hit 2 the menu quits and if they hit any other key it errors and shows the menu again. It seems to work ok in win2k but not NT 4.
Any ideas what I am doing wrong? Many thanks
:MENU
ECHO. 1) To install the Update press 1 and then enter
ECHO. 2) To quit without installing the update press 2
@ECHO OFF
set INPUT=
Set /P INPUT="Please make a selection "
If "%input%"=="1" goto NT
If /I "%input%"=="2" goto QUIT
cls
GoTo MENU
:NT
if '%OS%' == 'Windows_NT' goto INSTALL
if not errorlevel 1 goto OSERROR
:INSTALL
cls
echo.
echo. Installing software... you will be prompted to reboot when complete
setup.exe
goto QUIT
:OSERROR
cls
echo. Sorry, cannot install onto Windows 95, 98 or ME PC's
pause
exit
:QUIT
cls
echo.
echo.
echo.
pause
exit
I am a little new to creating batch files, essentially I want the script below to run a menu, if the user presses 1 they are taken to a setup.exe. If they hit 2 the menu quits and if they hit any other key it errors and shows the menu again. It seems to work ok in win2k but not NT 4.
Any ideas what I am doing wrong? Many thanks
:MENU
ECHO. 1) To install the Update press 1 and then enter
ECHO. 2) To quit without installing the update press 2
@ECHO OFF
set INPUT=
Set /P INPUT="Please make a selection "
If "%input%"=="1" goto NT
If /I "%input%"=="2" goto QUIT
cls
GoTo MENU
:NT
if '%OS%' == 'Windows_NT' goto INSTALL
if not errorlevel 1 goto OSERROR
:INSTALL
cls
echo.
echo. Installing software... you will be prompted to reboot when complete
setup.exe
goto QUIT
:OSERROR
cls
echo. Sorry, cannot install onto Windows 95, 98 or ME PC's
pause
exit
:QUIT
cls
echo.
echo.
echo.
pause
exit