home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
-
- ; the following line runs windows
- WIN
-
- ; the following line parses the file created by ExitW and
- ; modifies the environment variables or returns a DOS errorlevel
- ; code. It can also do both or neither of the above.
- ; note that this example uses a data file contained in C:\WIN
- EXITWDOS C:\WIN\EXITW.DAT
-
- ; if the returned error level code is 3 then run autocad
- IF ERRORLEVEL 3 GOTO AUTOCAD
-
- ; if the returned code is 2 then run wordperfect
- IF ERRORLEVEL 2 GOTO WORDP
-
- ; if the code is 1 then run lotus
- IF ERRORLEVEL 1 GOTO LOTUS
-
- ; if the errorlevel code is none of the above then just exit to DOS
- GOTO END
-
- :AUTOCAD
- ; run autocad
- CD \AUTOCAD
- ACAD
- ; now call this batch file to start the cycle again
- WINBAT
-
- :WORDP
- ; run WordPerfect
- CD \WP
- WP
- ; now call this batch file to start the cycle again
- WINBAT
-
- :LOTUS
- ; run 123
- CD \123
- 123
- ; now call this batch file to start the cycle again
- WINBAT
-
-
- :END
- ; jumping to this point just dumps the user back to DOS
-