With the advent of DOS 6 you can now add a start up menu to your CONFIG.SYS file. Here's some ideas on why you might want to use a multiple startup config.sys menu. Suppose that you backup your hard drive once a week. It might require you to install a device driver in the config file but it takes an extra minute to boot up your computer. Since you only need to use it once a week you can add a startup menu to your config.sys file that lets you install it only when it's needed.
You can also use this to choose whether or not to install network device
drivers or run off of a local disk drive.
The high school that I went to used one that let you choose a local
CD-ROM device or the network CD-ROM. I personally use a startup menu to make a RAM drive
on my computer. Some days I need one, some days I don't. Some days I need to make
different sized RAM drives, the config.sys menu makes this VERY helpful.
Beware of using Memmaker with a config menu.
How to use Memmaker with a config menu
The main commands used with a menu are [MENU] and MENUITEM. The
MENU command is used to start a block heading (Used with brackets).
MENUITEM is used to define a startup block to execute. Here's an example of usage:
[MENU]
MENUITEM NETWORK_START, Start The Network
MENUITEM MS_ANTIVIRUS_START, Run MS-Antivirus
MENUITEM BOTH_START, Start Both The Network And MS-Antivirus
MENUITEM SIMPLE_START, Start Neither Of Them
Each line is a separate start up block. In the first line MENUITEM starts
the process. NETWORK_START is the name of the configuration block to execute
if that line is selected. Notice that it's followed by a comma. That tells
DOS to display whatever is after it, which is "Start The Network", on your
menu screen. This same procedure goes for every other MENUITEM line.
Each line can only contain 70 characters. The menu line displayed as your
menu can contain any ASCII character, however, the configuration block
can't contain the following: spaces / \ , ; = [ ]
[NETWORK_START]
Now, each configuration line requires a separate configuration block.
Here's what the block for our first line might look like:
DEVICE=C:\NET\PROTMAN.DOS /i:c: \net
DEVICE=C:\NET\WORKGRP.SYS
DEVICE=C:\NET\EXP16.DOS
This block starts PROTMAN.DOS and enters the switches /i:c: \net. Then
it starts WORKGRP.SYS and EXP16.DOS.
Lets take a look at the third option in our menu, Start Both.
[BOTH_START]
INCLUDE NETWORK_START
INCLUDE MS_ANTIVIRUS_START
The INCLUDE command calls the NETWORK_START configuration block and
the MS_ANTIVIRUS_START block. You could just retype the entire network
and antivirus blocks in this one block, but this is an easier method to
use. Caution- this method also wrecks havoc on Memmaker. See
Using Memmaker with config startup menus.
The last option block, SIMPLE_START, would just be blank or could just
call a common block.
[MENU]
MENUITEM NETWORK_START, Start The Network
MENUITEM MS_ANTIVIRUS_START, Run MS-Antivirus
MENUITEM BOTH_START, Start Both
MENUITEM NIETHER_START, Simple Start
MENUDEFAULT NIETHER_START, 10
It looks pretty much the same as the first menu except for the last
line which has MENUDEFAULT instead of MENUITEM. It gives the user
10 seconds to pick an option and then automatically starts
the NIETHER_START configuration block. The timeout period can range
from 0 to 90 seconds. Note: 0 automatically starts the default block
and doesn't allow you to choose any other options.
You can add a line anywhere in your menu to change the default
colors of your menu.
MENUCOLOR x, y
x is the color of the menu text and y is the color of the background.
Here's a list of color codes:
0 BLACK 8 GREY 1 BLUE 9 BRIGHT BLUE 2 GREEN 10 BRIGHT GREEN 3 CYAN 11 BRIGHT CYAN 4 RED 12 BRIGHT RED 5 MAGENTA 13 BRIGHT MAGENTA 6 BROWN 14 YELLOW 7 WHITE 15 BRIGHT WHITE
Suppose that you want be able to choose to run windows off the network or off a local hard drive. You could make a submenu within a configuration block that would let you do that. Here's what it would look like:
[MENU]
SUBMENU WINDOWS_SELECT, Run Windows Local Or From Network
[WINDOWS_SELECT]
MENUITEM WIN_NETWORK, Run Windows Off The Network
MENUITEM WIN_LOCAL, Run Windows Off Local Hard Drive
MENUITEM NO_WINDOWS, Don't Run Windows At This Time
SUBMENU MENU, Return To Main Menu
Basically you just stick a submenu line in your main menu block.
When selected it calls another menu of its own.
Each MENUITEM start up block is set up just like described earlier. Notice the last line,
SUBMENU MENU. This will send the user back to the main menu, a nifty little trick. Using
submenus can be a bit hectic, so you might want to do some pencil and paper planning before
you actually tackle them.
GOTO %CONFIG%
In that example I used the GOTO command with an environment
variable called %CONFIG%, which is the name of the configuration
block you selected in the config menu, to select something and
start the appropriate program. Here is another way to do the same thing with
the IF command. It's a bit shorter, but not much. If you have several config blocks that
can be used, the above method will be shorter. Example:
IF "%CONFIG%"==NETWORK_START C:\NET\NETX.EXE
If you need help understanding what this batch file did you can
refer to my page on
Batch Commands.
All right boys and girls, this is what you've all been waiting
for. The DOS 6 bible is doesn't have the best way to use Memmaker
with config menu setups. Microsoft must been too busy putting an
apple under the microscope to realize the all the problems with this.
It takes some work, but eventually this method will fully optimize
your config.sys start up file. Memmaker doesn't know anything
about the following commands:
[MENU]
The way to get around this is to comment out all lines except
for the one configuration block. Do this by adding a semicolon to the beginning of every line except for the one configuration block you
want to optimize and any commands that appear before the [MENU]
statement. For your autoexec.bat file you would use the REM statement
Run Memmaker one time for each configuration block. After
running it, comment out the block you just ran and un-comment out
another block. Then run Memmaker again. Continue until all blocks
are accounted for. NOTE: Include statements cannot be used at all
if you use Memmaker. You must add what lines you are including to
each block needing them. Memmaker cannot set the included blocks
to run differently for different configurations. You will have to use this method for EVERY
POSSIBLE CONFIGURATION. Unless, of course, there are some configurations that you
KNOW you will NEVER USE (Like, say, you know you'll never want to load a driver for a sound card
at the same time you want to load a driver for a tape backup). Still got problems?
E-mail me at
dosman33@hotmail.com
With DOS 6 you have the ability to run batch files from within
a config.sys file. You use the command INSTALL and then the
name and path of the file you want to run. Be careful, TSR's are
probably the only kind of things you would want to install within
your config.sys file. When you run a program from this point, it
doesn't get a copy of the environment to use (Normally a program gets
a copy of the DOS environment). You might have to experiment to see
what you can run from here.
Evil Genius Tip: start a phony autoexec
menu program within your config.sys program. If someone tries to
crash out to DOS they will end the batch file, but still be in the
middle of your config.sys file. A devious person may be able to
use this to crash the computer, protecting your goodies within. If
not, you still have a nifty trick because after your config file
ends, it will begin to run your autoexec.bat file at least confusing
an intruder.
A neat thing with the config menu is that when you select an option
DOS sets the name of the configuration block you chose as an
environment variable called CONFIG. Say that you want your computer to automatically log onto
the network when you select to load the network device driver in
your config menu. You can have your autoexec.bat file use the
variable like this:
:NETWORK_START
C:\NET\NETX.EXE
GOTO END
:MS_ANTIVIRUS_START
C:\DOS\MSANTIVS.EXE
GOTO END
:BOTH_START
C:\DOS\MSANTIVS.EXE
C:\NET\NETX.EXE
:NEITHER
GOTO END
:END
IF "%CONFIG%"==MS_ANTIVIRUS
IF "%CONFIG%"==BOTH_START GOTO BOTH
IF "%CONFIG%"==NEITHER GOTO END
GOTO END
:BOTH
C:\NET\NETX.EXE
C:\DOS\MSANTIVS.EXE
:END
LH C:\DOS\MOUSE6.COM
LH C:\MENU\BIGMENU
MENUITEM
SUBMENU
INCLUDE
COMMON
This web page is copyrighted by Nathan Heald. Reproduction is allowed as long as this message is not removed or modified in any way. Frames site No-frames site. How to print pages off of this site. The official URL of DOS HeadQuarters is http://dos.rsvs.net