Category : Utilities for DOS and Windows Machines
Archive   : SETEXEC.ZIP
Filename : SETEXEC.DOC

 
Output of file : SETEXEC.DOC contained in archive : SETEXEC.ZIP
Here's a real simple solution to the problem of multiple configurations at
boot up. Being a simple solution, it's not very powerful, but it should
be helpful to someone. It prompts the user for an errorlevel to set. If
none is given in 2 seconds, it times out and sets the errorlevel to zero.

You would put it in your autoexec and then test for the errorlevel and
branch to whatever setup you want, like this:

rem Autoexec.bat
@echo off
prompt $p$g
path=c:\;c:\dos;..

setexec
if errorlevel 9 goto LOAD_W3
if errorlevel 8 goto LOAD_ACAD
if errorlevel 7 goto LOAD_PMENU

...

:END

Come to think of it, this utility is no more than a glorified GETKEY
(a fairly classic debug-script file that gets a key and sets an errorlevel
(exit code) based on the ascii value of the key). Oh well, at least it's
got a timeout. The idea behind the code is one I've been using a lot
lately: query the PC (vidtype.c, included) or the user for an a piece
of information (the video card, a menu choice) and set an errorlevel. Use
a batch file to employ the errorlevel as a decision-maker.

The good thing about this idea is it is LANGUAGE INDEPENDENT. All PC
programming languages (I think) have an equivalent of C's exit() function
(e.g., GODOS() in CLARION).


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : SETEXEC.ZIP
Filename : SETEXEC.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/