Fox Y2K Logo
The DOS Zone - FAQs


The DOS Zone

FAT System Guide

My Software


How do I set up a DOS startup menu?


Please view my Notices page before viewing this area, it is not complete!
This is work in progress.


This menu ability is a feature of MS-DOS 6.00 and above including MS-DOS 7.xx the one that comes with Windows 9x. It allows you to run different commands, and therefore configure your machine differently, depending on what options you choose. This is all well and good but how is it achieved? Well you need to change at least your CONFIG.SYS file and probably also your AUTOEXEC.BAT file.

The first thing to do is to include "[MENU]" in your CONFIG.SYS file.
Now comes a unlikely scenario which is needed to show how this works. Basically you have two people using the same machine (Fred and Sid?), anyway the one likes to have the country set up for the UK whereas the other prefers to be set up to use US information. I'm now going to show how a menu is set up for this situation.

You obviously need two items on this menu, I'm going to call these "United Kingdom Configuration" and "United States Configuration".
These options must now be added to CONFIG.SYS (after "[MENU]"), the CONFIG.SYS file will now look like this:
Menuitem=UK,United Kingdom Configuration
Menuitem=US,United States Configuration

The "Menuitem=" adds a menu item. "UK" and "US" are the blocknames we'll come to these later. The "United Kingdom Configuration" and "United States Configuration" will actually be printed on screen, you could use whatever you wanted to more or less.

Now of course when the UK option is chosen you need to execute "Country=044" and for the US option "Country=001" how is this done? Simple add the following to CONFIG.SYS:

Note that the "UK" and "US" inside the square brackets corresponds to the block names chosen earlier. You could have called these whatever you like within certain limits. They can be up 70 characters long but mustn't contain spaces; backslash '\' or slash '/'; comas, semicolons, equals sign '=' or square brackets '[' and ']'.

Lets look at another scenario, three users. They all have to have a CD-ROM driver loaded, one likes to use US settings, another prefers UK settings the last likes Hungary date settings and wants ANSI.SYS loaded. The CONFIG.SYS file will look like this:

The "[COMMON]" block can be used whenever a command common to all menu items needs to be executed, in this case a CD-ROM driver needs to be loaded.
The next weird thing is that there is no text specified to be displayed as there was before. The text is optional, if none is specified the block name is printed, "User1", "User2" and "User3" in this case.
To finish of this brief overview I'll show you how to change the commands run in AUTOEXEC.BAT depending on the selection made at the menu. With the above scenario in mind look at this AUTOEXEC.BAT file:
goto %config%
echo User1 option selected!
goto exit
echo User2 option selected!
goto exit
echo User3 option selected!
Not very useful but you could put whatever you wanted instead of or as well as echo.

The labels obviously depend on the blocknames in CONFIG.SYS. Even if an option does nothing in CONFIG.SYS you must still have the configuration block ("[<blockname>]").

You can do other things as well, for more information look up:

DOS Reference


Trawled this site and still can't find the solution to your problem?
If so I highly recommend The DOS Board.
It has several good techies waiting to answer your questions and I hang around there a lot too.

Copyright © Jonathan Fox 2000-2002.