MS-DOS 6.22 CONFIG.SYS Startup Menus Guide

MS-DOS 6.22 features native multi-configuration support, allowing users to define interactive startup menus directly inside the CONFIG.SYS file. This functionality lets you select between different system configurations—such as separate setups for gaming, standard work, or expanded memory usage—without needing third-party boot managers or separate boot disks. This article explains how the menu structure operates, details the key commands involved, and shows how selections pass to AUTOEXEC.BAT.

The Multi-Config Architecture

MS-DOS processes CONFIG.SYS linearly unless multi-configuration directives are present. When the system detects a [menu] block, it halts the boot sequence, clears the screen, and displays an interactive menu.

The configuration file is divided into distinct sections called blocks. Each block begins with a header enclosed in square brackets. There are three primary types of blocks:

  1. Menu Block ([menu]): Defines the structure, options, timeouts, and colors of the startup screen.
  2. Configuration Blocks ([blockname]): Contains device drivers and settings unique to a specific menu choice.
  3. Common Blocks ([common]): Contains commands executed regardless of which menu option is selected.

Core Menu Commands

The [menu] block uses a specific set of commands to construct the user interface:

  • MENUITEM: Adds an option to the list.
    Syntax: menuitem=block_name[,menu_text]
    The block_name designates the configuration block to execute if selected. The optional menu_text defines the descriptive label displayed to the user.
  • MENUDEFAULT: Designates a default selection and an optional countdown timer in seconds.
    Syntax: menudefault=block_name[,timeout]
    If the timer reaches zero before a key is pressed, MS-DOS boots the specified default block.
  • MENUCOLOR: Sets the text and background colors for the boot screen.
    Syntax: menucolor=text_color[,background_color]
    Colors are specified using standard DOS color values from 0 to 15.
  • SUBMENU: Links to a secondary menu block for nested configurations.
    Syntax: submenu=block_name[,menu_text]

Example CONFIG.SYS Structure

[menu]
menuitem=Standard, Standard Memory Setup
menuitem=EMS, Expanded Memory for Gaming
menudefault=Standard, 10
menucolor=15, 1

[common]
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB

[Standard]
DEVICE=C:\DOS\EMM386.EXE NOEMS

[EMS]
DEVICE=C:\DOS\EMM386.EXE RAM

[common]
FILES=40
BUFFERS=30

In this setup:

  1. HIMEM.SYS and high-memory settings run for every configuration because they reside in the first [common] block.
  2. The user sees a blue screen with white text offering two choices, with a 10-second timer defaulting to Standard.
  3. Choosing Standard loads EMM386.EXE without expanded memory; choosing EMS loads it with expanded memory enabled.
  4. The trailing [common] block ensures FILES and BUFFERS apply to both configurations.

Integration with AUTOEXEC.BAT

When a user makes a selection from the CONFIG.SYS menu, MS-DOS stores the chosen block name in an environment variable named %CONFIG%.

AUTOEXEC.BAT reads this variable using the GOTO command to branch execution to corresponding labels, ensuring software utilities match the chosen hardware drivers.

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

GOTO %CONFIG%

:Standard
ECHO Loading standard environment...
GOTO End

:EMS
ECHO Loading CD-ROM and Sound drivers...
LH C:\DOS\MSCDEX.EXE /D:MSCD001
C:\SB16\SBAWE32.EXE /S
GOTO End

:End

By leveraging the [menu] structure in CONFIG.SYS alongside the %CONFIG% variable in AUTOEXEC.BAT, MS-DOS 6.22 provides a fully integrated method for managing diverse hardware profiles and memory allocations from a single boot process.