home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1996 October
/
Chip_1996-10_cd.bin
/
share
/
wevent
/
startwin.bat
< prev
next >
Wrap
DOS Batch File
|
1996-08-27
|
1KB
|
31 lines
@echo off
:StartWin
win REM when testing, rem this line
rem erlevel %1 REM when testing, un rem this line
if errorlevel 8 if not errorlevel 9 goto Test1
if errorlevel 7 if not errorlevel 8 goto Test2
Echo: No errorlevel was processed - Exiting to DOS -
if errorlevel 0 if not errorlevel 1 goto end REM If you didn't get an errorlevel.
goto quit REM If the errorlevel is greater that zero.
:test1
set %1=errorlevel REM Set a variable so we can display the value
Echo Errorlevel is ' %1 ', Running 'Your Program test1' and then Restarting Windows.
pause Put your the program you want to start here. Press Ctrl+C to exit to DOS.
goto StartWin REM Restart Windows
:test2
set %1=errorlevel REM Set a variable so we can display the value
Echo Errorlevel is ' %1 ', Running 'Your Program test2' and then Restarting Windows.
pause Put your the program you want to start here. press Ctrl+C to exit to DOS.
goto StartWin REM Restart Windows
:quit REM Display the errorlevel
set %1=errorlevel REM Set a variable so we can display the value
Echo Errorlevel is ' %1 '
:end REM End of batch file
set 1= REM Clear the memory for the variable