MS-DOS 6.22 Boot Menu Driver Configuration

MS-DOS 6.22 provides native multi-configuration support that allows users to select custom startup parameters through an interactive boot menu. By using specialized block commands within CONFIG.SYS and coupling them with the %CONFIG% environment variable in AUTOEXEC.BAT, the operating system dynamically loads specific device drivers, memory managers, and TSR (Terminate and Stay Resident) programs based on the user's selection at boot time.

The CONFIG.SYS Menu Architecture

The configuration process begins in the CONFIG.SYS file, where commands are grouped into distinct, named blocks. Instead of executing commands sequentially from top to bottom, MS-DOS parses the file based on a primary [menu] block.

The [menu] block contains commands that define the options presented to the user:

  • menuitem: Defines a selectable block name and an optional display description. For example, menuitem=GAME, Gaming Setup creates a menu choice named "GAME" labeled "Gaming Setup".
  • menudefault: Specifies the fallback block name and a countdown timer in seconds (e.g., menudefault=GAME,10).
  • menucolor: Defines the text and background colors for the boot menu screen.

Defining Configuration Blocks

Once the menu choices are defined, corresponding bracketed blocks are written lower in CONFIG.SYS. MS-DOS only executes the lines within the block corresponding to the user's selection.

For instance, hardware drivers requiring significant conventional memory, such as CD-ROM drivers (OAKCDROM.SYS) or sound card drivers, can be isolated to a specific block:

[menu]
menuitem=STANDARD, Standard Office Configuration
menuitem=GAME, High-Memory Gaming Setup
menudefault=STANDARD,10

[STANDARD]
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB

[GAME]
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE RAM 4096
DEVICEHIGH=C:\DRIVERS\CDROM.SYS /D:MSCD001
DOS=HIGH,UMB

[COMMON]
FILES=40
BUFFERS=15

The [COMMON] block executes regardless of the selection. It is standard practice to place universal system settings (such as FILES and BUFFERS) inside a [COMMON] block at the bottom of the file.

Direct Driver Prompting (? Operator)

MS-DOS 6.22 also supports inline conditional loading without full menu blocks by using a question mark (?) immediately before the equals sign. For example:

DEVICEHIGH?=C:\DRIVERS\MOUSE.SYS

During startup, MS-DOS will pause at this line and prompt the user with a [Y/N] prompt, loading the driver only if the user confirms with Y.

Coordinating with AUTOEXEC.BAT

When an option is selected from the CONFIG.SYS menu, MS-DOS automatically assigns the selected block's name to an internal environment variable named %CONFIG%.

The AUTOEXEC.BAT script evaluates this variable to run matching startup utilities (such as MSCDEX.EXE for CD-ROM drive letters or SMARTDRV.EXE for disk caching) using conditional jumps:

@ECHO OFF
PROMPT $P$G
PATH C:\DOS;C:\UTILS

GOTO %CONFIG%

:GAME
LH C:\DOS\MSCDEX.EXE /D:MSCD001
LH C:\DRIVERS\CTMOUSE.EXE
GOTO END

:STANDARD
C:\DOS\SMARTDRV.EXE 2048 128
GOTO END

:END

By directing control with GOTO %CONFIG%, MS-DOS bypasses unneeded TSR programs and customizes user space dynamically while maintaining a single, unified set of boot files.