Multi Config.sys & Autoexec.bat
[Geek Home] [PC Hints & Tips] [Internet] [Programming] [Nanet Sites]

Sometimes, due to memory considerations (RAM), etc. you may need to have your computer reboot without loading additional features.

For instance, I have 24 MB of RAM on my PC at home, but I use a multiple configuration bootup in my config.sys and autoexec.bat to optionally load my scanner only when I need it. That way my girls can load all those memory intensive CD ROM games and play while I’m at work.

At work, I load multiple configurations for programming purposes. I utilize separate environment variables dependent upon which programming environment I’m currently using. I need this mostly for keeping separate classpaths and path statements.

But I would say the average user will use this feature to load peripherals only when needed for my FIRST purpose as indicated above.

Suggestion: I would first load all of my software and hardware. Then I would alter the config.sys and autoexec.bat files. Most installation routines don’t know how to handle a multi-config setup.

How do you setup a Config.sys and Autoexec.bat file to accommodate custom boots?

Config.sys - Make a BACKUP before you begin!

menuitem=Games & Network


Put everything here pertaining to game requirements. IE any joystick loading etc.

Put anything here required for network.

Put anything here required for Scanner.

[Games & Network]
Put anything here required for both Games & Network. In most cases will be a repeat of each of the sections above.


Begin your file with the [MENU] command. Follow it with the different menu items you wish to have.

The menudefault line indicates which menu item to select after so many seconds if the user has not selected one. In this case, Games will be chosen after 10 seconds.

Your config.sys MUST then have a TAG for each menu item you have setup. Even if it does not have anything in it in the config.sys but only the autoexec.bat, it must be setup with nothing following it at least, ie:
[Games & Network]

The [COMMON] tag is optional and may be used for command lines that each configuration will share. Rather than repeating the same command in every tag, follow all tags with [COMMON] and put in the shared commands.

Autoexec.bat - Make a BACKUP before you begin!

rem multiple configuration set up July 15, 1997 by nkt




SET BLASTER=A220 I5 D1 H5 P330 T6





IF %CONFIG%==Games & Network GOTO Games




rem here you would load your joysticks, and/or whatever is necessary for your games.

IF %CONFIG%==Games & Network GOTO Network


rem here load your network commands. I prefer keeping my network commands in a separate .bat file and calling that .bat file from here.

rem load your scanner stuff here



SET PATH = C:;C:\a\vj\EAB\jdk\bin;C:\a\vj\EAB\bin;C: \a\vj\EAB\odbc32;C:\D2\BIN;C:\D2\FUNCTION ;C:\D2\SNA\SYSTEM;C:\A\J1\BIN;C:\A\ZIP;c: \COREL\OFFICE7\SHARED\TRUEDOC\BIN


rem = a REMARK. If you want to comment on what you have done, begin the line with “rem.”

The “PROMPT” command tells what to use for the command prompt. In this case $P$G will make the command line be a:

Put anything here that is shared by all configurations. Sometimes you may put some shared things at the very bottom instead, depending on how they have to be loaded during boot.

In this case I am loading Soundblaster stuff. If you are low on memory, you might want soundblaster to be disabled for certain instances and would include it separately.

If the configuration tag selected by the user in the config.sys is equal to Games & Network, you can tell it to GOTO Games. Then after Games has completed, you check again and tell it to go to Network.

This saves you from having to duplicate information in a :Games & Network tag.

The “GOTO %CONFIG%” command tells the .bat file to go to the TAG for the configuration selected by the user from the config.sys file.

Now you can put your tags. Put a COLON followed by the tag exactly as input in the config.sys file menuitem. Not with braces as in the config.sys.

After each tag section is complete, use GOTO END to exit that tag and go to the :END tag below. Following :END can be nothing or whatever other shared commands there are.

I’ve found that since I use a lot of different programming environments, my path statement length often exceeds the DOS character limit. In that case, I must have multiple configurations dependent upon the programming environment I intend to use so that I can load a different path statement for each TAG selected.

Otherwise, your path statement can be after the :END tag, shared by all.


There is NO return following the SET PATH = ... it only looks that way because it broke to the next line. The path statement must be on one line.

To see if your path length exceeds the limits, from the DOS command line prompt type:
followed by ENTER and it will return your path statement. From there you can make sure it includes everything that is included in your autoexec.bat file.

Another command is:
This will show all of your environment variables.

 Backup Startup  Startup Disk  Multi Config  Skip Startup  PC Maint.
[Geek Home] [PC Hints & Tips] [Internet] [Programming] [Nanet Sites]

Modified: 02/11/99