In the MS-DOS operating system, there are
two special configuration files, called CONFIG.SYS and AUTOEXEC.BAT.
These important files can be included in the DOS bootup process. These
two files play a crucial role in optimizing the system for operations
in particular functions or with different options.
As the system moves through the steps in the boot procedure,
the BIOS first checks in the root directory of the boot disk for
the presence of the CONFIG.SYS file. Next, it searches for the
COMMAND.COM interpreter, and finally looks in the root directory
again for the AUTOEXEC.BAT file. Both the AUTOEXEC.BAT and
CONFIG.SYS files can play significant roles in optimizing the
system memory (as discussed later in this chapter) and
disk-drive usage. Their involvement in the bootup process can be
summarized as follows:
- IO.SYS
- MSDOS.SYS
- CONFIG.SYS
- COMMAND.COM
- AUTOEXEC.BAT
This is also the order in which CONFIG.SYS, AUTOEXEC.BAT and
the other important files involved in the MS-DOS boot process are
loaded and executed.
Tip: Remember the files involved with the DOS bootup
process and the order of their execution.
In Windows 9x, Config.sys is mostly needed for the installation
of real-mode device drivers for those devices that may not be
supported by Windows 9x's (32-bit) device drivers. Real-mode is
discussed later in this chapter in the section, "Real-mode
versus Protected mode Memory Addressing".
CONFIG.SYS
The config.sys in most Windows 9x will be empty (plain text file)
waiting for any changes that the user might want to add to the
system. In the migration from DOS to Windows 9x, most of the
values formerly located in this file have been moved to IO.SYS. To
override values in IO.SYS, enter the appropriate statements in
Config.sys, including the values. It is also used to
run memory managers, detailed later in this chapter.
During the boot process, while the MS-DOS message "Starting DOS..."
is on, the screen special function keys are available to alter the
loading process of CONFIG.SYS (and an option for AUTOEXEC.BAT) as
follows:
- F5 (also Left Shift key) – Skips CONFIG.SYS file
(including AUTOEXEC.BAT files, if this option is chosen).
- F8 – Proceeds through the CONFIG.SYS (and AUTOEXEC.BAT,
if needed) files one step at a time waiting for Confirmation from
the user.
Tip: It is important to know which function keys can be
used during the boot process.
AUTOEXEC.BAT
This file contains a batch of DOS commands that will automatically
be carried out when DOS is loaded into the system. Examples of
commands normally located in the Autoexec.bat file include the
following:
- DATE – Causes DOS to prompt user for the date
- TIME – Causes DOS to prompt the user for the date and
time
- PROMPT=$P$G – Will cause the active drive and directory
path to be displayed on the command line.
- SET TEMP=C:\TEMP – Will set up an area for holding data
temporarily in a directory called TEMP.
- PATH=C:\;C:\DOS;C:\MOUSE – Creates a specific set of
paths that DOS uses to search for executable (.COM, .EXE, and
.BAT) files. In this example, DOS will search for executable files
first in the root directory (C:\), followed by the DOS directory
(C:\DOS), and finally the Mouse directory (C:\MOUSE).
- DOSKEY – loads the DOSKEY program into memory.
- SMARTDRV.EXE 2048 1024 – SMARTDRV.EXE 1024 2048 command
configures the system for a 1 MB disk cache in DOS, and a 2 MB
cache for Windows.
- CD\ – Causes the DOS default directory to change to the
root directory.
- DIR – Causes a DOS DIR command to be performed
automatically
It is important to know which commands are normally located in
the AUTOEXEC.BAT file.