The Lemming Homepage:
Jimmy MacLemming and the Sad Day Oh No! It's the Lemmings Games Web Page Where is it? What's in here? Help! I'm stuck. I can't get it working. Free Demos you need to have The list of all Lemmings Games Images, Animations, Sounds, Desktop Icons Other stuff I want more The Lemming Zoo - real lemming information What's this Lemmings page?

Setting up a configuration menu for DOS/Windows (95)

Be careful. if you are not completely sure create a boot floopy first. Keep a backup of the files you are going to edit!

I take no responsibility if something should fail!

The examples listed here are only parts of actual files, your final config.sys and autoexec.bat will be much larger.

  1. For Windows 95: make a backup copy of and then edit the file C:\MSDOS.SYS and modify the BootGUI value to BootGUI=0 (it is in the [Options] part). This prevents Windows 95 from starting automatically which can then be done by the command win (Yes, and Windows 95 is an operating system :-)

  2. Now it's time to set up the configuration sections in C:\config.sys (don't forget to make a backup copy). First of all, create a menu section [Menu] like this:
       [Menu]
       Menuitem=win95, Windows 95
       Menuitem=dos, DOS 7.0
       Menuitem=linux, Linux
       Menudefault=win95, 10
    Create a Menuitem entry for each possibility you will need.
    Syntax: Menuitem=<ID>, <description>
    The ID is used to identify the options you set up. The description is what you will see when booting.

    If you want a default option to be selected after some time (if no key is pressed) use Menudefault.
    Syntax: Menudefault=<ID>, <timeout>
    This instructs the system to use the option identified by ID after timeout seconds.

  3. For each ID specified with Menuitem an entry has to be created in config.sys. There is a special entry named [common] (don't use this with Menuitem) which is used for things that are needed regardless of which configuration option is selected.
       [Common]
       rem Anything that should be done regardless of which
       rem option is selected
    
       [win95]
       rem Windows 95 doesn't need a lot of things here.
    
       [dos]
       rem Put all the things here the original config.sys
       rem contained.  For instance:
       DEVICE=C:\Windows\Himem.sys
       DEVICE=C:\Windows\Emm386.exe 8192 RAM
       DOS=Umb,High
       FILESHIGH=30
       LASTDRIVEHIGH=L
       rem and a lot of other things...
    
       [linux]
       rem Linux will be started with loadlin from autoexec.bat
    Each section is started with [ID] and ends where the next section starts (or at the end of file). It's a good idea to create an option which will contain exactly the setup as it was before modification. Windows 95 can take care of memory management for DOS boxes, so there is no need for Himem.sys or Emm386.exe in most cases. Whenever a device driver is available for Windows 95 use this one and not the DOS driver loaded from config.sys.

  4. Once you have created a section for each ID you need, it's time to change the file C:\autoexec.bat (again, make a backup copy first...). Put the commands you want to be run first which should be common for every configuration option at the top. These might be a Virus Scan, setting the path, ... (this is similar to the [Common] section in config.sys.
       set path=%path%;C:\bin
       set temp=C:\tmp
       scan.exe C:\
    Following comes a goto %config%. %config% will hold the ID you select at startup (e. g. win95).

  5. For each ID you have set up in config.sys create a label :ID followed by the commands that should be run when this option is selected at startup and the statement goto end (which is not always needed). Behind the end of the last section
       :win95
       rem The next line is just an example. It is used to set the refresh
       rem rate in Windows 95 on my home system
       C:\bin\S3REFRSH 91a0
       win
       rem does Windows 95 return here? If not, goto end is not needed here
       goto end
    
       :dos
       rem As with config.sys it is a good idea to put any statement
       rem from the original autoexec.bat here.
       lh mscdex /d:OEMCD001 /L:I
       keyb gr,,C:\WINDOWS\COMMAND\keyboard.sys
    
       rem goto end is a really good idea here - otherwise lin.bat would
       rem be called!
       goto end
    
       :linux
       rem Load linux using a batch file which calls loadlin
       C:\bin\lin.bat
       rem goto end is not needed here for two reasons: 1st it doesn't
       rem make sense because the label it would jump to is following directly
       rem 2nd linux never returns here
    
       :end
       rem You might want to put something here...
    It's a good idea to use commands which are used to set up some Windows characteristics (like the refresh rate, as shown in the example above) in the win95 part. win will start Windows 95 afterwards.

    The statements between :dos and the next following goto end should include all statements in the original autoexec.bat without those already listed at the top (before goto %config%) and the bottom (after the label :end).

  6. You are ready to test it now. Let's hope it works. If it doesn't you still have the backup copies to start all over. If everything should fail now you've still got your boot disks, haven't you?

  7. Menu options may now be added or deleted as required.
[ Home | Contents | Index | Help | Demos | Games | Editors | Reviews | Artwork | Pictures | Links | Zoo | Other | About ]

© 1995 - 1997 by Thomas Linder, Student of Computer Science at:
University of Technology, Vienna, Austria, Europe, Earth, Solar System, Milky Way, Universe.
Thomas.Linder.net