Jump to content

MENUITEM (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article MENUITEM (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryOperating systems
Founded1983
Headquarters
N/A
ProductsConfiguration commands for DOS and OS/2

CONFIG.SYS serves as the fundamental configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—processes during system startup. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to set up DOS for hardware devices, software applications, and memory allocation. Once these commands are executed, DOS initiates the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently processes the AUTOEXEC.BAT file.

This file primarily contains name=value statements that either adjust configurable settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory.

In DOS environments, CONFIG.SYS is located in the root directory of the boot drive.

Certain DOS versions prioritize alternative filenames over CONFIG.SYS:

- Concurrent DOS 386/XM and Multiuser DOS look for CCONFIG.SYS or CCONFIG.INI (the latter used by some Multiuser DOS variants). REAL/32 seeks MCONFIG.SYS. These platforms also employ a binary configuration file named CCONFIG.BIN, which is generally modified using CONFIG.EXE.

- For DR DOS versions 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS. Initially associated with disk compression utilities, this naming convention also facilitates multi-boot setups. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS releases check for DRCONFIG.SYS.

- Starting from DR-DOS 6.0 onward, users can alter default system file extensions via SYS /DR:ext, allowing multiple concurrent sets of system files selectable through boot loaders such as LOADER (used in Multiuser DOS and DR-DOS 7.x). The SHELL directive supports specifying alternative AUTOEXEC.BAT files using /P[:filename.ext], accepting extensions beyond ".BAT". The CHAIN=filespec command enables execution of additional configuration files located outside the root directory; DR-DOS 7.02 and later also support labeled jumps within these files.

- DR-DOS 7.03 and subsequent versions introduce SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside core system files.

Comparable features are present in other DOS variants: FDCONFIG.SYS in FreeDOS, RXCONFIG.SYS in RxDOS 7.24+, and CONFIG.PTS in PTS-DOS.

While Windows 95 and 98 maintain CONFIG.SYS and AUTOEXEC.BAT on boot volumes, these files are usually left empty. Windows Me does not process CONFIG.SYS; instead, it retrieves environment variables from the registry path:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

In the case of FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.

Example

A sample CONFIG.SYS tailored for MS-DOS 5: <syntaxhighlight lang="ini" line="1"> DOS=HIGH,UMB DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\ANSI.SYS FILES=30 SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P </syntaxhighlight>

:;*?!

Defines labels within CONFIG.SYS that serve as targets for , , , and commands.
Functions like , but allows inline comments following other directives within CONFIG.SYS. (Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
Used at the beginning of inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS omits optional messages but supports conditional execution via boot menus.) From DOS version 6.0 onward, a similar mechanism exists by appending after directives; this is also supported by DR DOS.
Forces unconditional execution of the next CONFIG.SYS directive.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Functions as a boot manager.
Adjusts the verbosity level of error messages.
Changes the default serial driver assigned to the AUX device.
Restricts character device availability outside the phantom \DEV directory.
Loads the primary device driver into system memory.
Produces a brief beep even if audible alerts are disabled.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C monitoring.
Defines the quantity of disk buffers to allocate.
Similar to BUFFERS but allocates buffers in HMA or UMB areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation and flushing behavior.
Executes programs listed in CONFIG.SYS, running them in the foreground and pausing processing until completion.
Sets the Caps Lock status on the keyboard.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver name and buffer settings.
Continues processing CONFIG.SYS from a new file or label.
, CLS (PTS-DOS or DR DOS specific)
Sets clock type and clears screen commands.
(OS/2 only)
Defines OEM codepage configurations.
, COLOR (PTS-DOS only)
Specifies CMOS RAM address and boot menu color settings.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Defines count, logical sequence, I/O addresses, and timeout parameters for serial ports.
, COMMENT(S) (PTS-DOS or various DOS versions)
Sets DMA buffer parameters and customizes inline comment markers or line ignoring behavior.
(Multiple DOS versions and OS/2)
Activates international language support features.
, CPSW (DR DOS or MS-DOS specific)
Configures cursor positioning for menus and enables codepage switching support.
CPU directives (PTS-DOS only) allow conditional execution based on CPU type or speed (e.g., CPU88, CPU286+, CPU386).

DTemplate:NbndF

Controls relocation of drive descriptor tables in memory.
Defines memory segment limit for multi-sector disk data deblocking operations.
Activates internal debugger functionality.
Functions as a boot manager utility.
Loads a device driver into system memory.
Loads a device driver into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures cache size parameters for memory management.
Specifies floppy disk compatibility mode settings.
Determines display font selection.
Configures loading DOS into high memory area and/or utilizing upper memory regions (similar to in DRDOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES into upper memory blocks.
Specifies an alternative directory path for DOS files.
Defines search paths for data files used by the system.
Sets parameters related to physical disk drives.
Establishes attributes for unrecognized or unknown drives.
See .
Enables error logging via PDUMP.nnn files and designates drive location for logs.
Displays messages on-screen during configuration processing.
Outputs messages using ANSI Escape codes for enhanced formatting.
Applies additional validation checks when launching programs.
Sets expected error or return codes for subsequent commands in CONFIG.SYS processing.
Controls A20 gate state during program startup sequences.
Terminates CONFIG.SYS processing prematurely except for certain directives that must complete.
Adjusts hash table size to optimize file opening speed, differing from MS-DOS/PC DOS FASTOPEN implementation.
Defines number of cached File Control Blocks open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but loads File Control Blocks into upper memory areas.
Boot manager utility function.
Specifies maximum number of files that can be open at once.
Same as FILES but allocates file handles within upper memory blocks.
Supports execution of designated CONFIG.SYS subsections via IGNORE directive.

GTemplate:NbndI

Waits for a key press or timeout, then assigns the error level to the ASCII code of the key pressed or 1024 if timed out.
Resumes processing of CONFIG.SYS at the indicated label.
Continues nested CONFIG.SYS processing at a specific label, returning afterward to the previous point.
Refer to , , or for additional details.
See also .
See also .
Consult or for more information.
Consult or for more information.
Refer to .
Loads a TSR program into memory following DOS data segment relocation. Compare with INSTCDEX.
See , , or for further reference.
See also .
Refer to or for additional context.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the HMA segment.
Configures the CPU's HLT power-saving mode.
Enables scanning for boot sector viruses.
Loads installable file system drivers.
Prevents execution of particular CONFIG.SYS subsections.
Allows certain applications to operate at CPU ring 2, granting direct hardware access.
Incorporates directives from another menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the keyboard’s Insert mode state.
Installs a TSR program into memory.
Installs a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Loads a TSR program after relocating the DOS data segment. Compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the address where the keyboard buffer has been relocated.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
Lists directories searched for DLL files.
Handles compatibility settings for legacy software.
Determines the number of file locks allowed.
Configures boot logo display when using PTS-DOS boot manager.
Specifies count, sequence, I/O port address, and timeout for LPT1 device configuration.
Provides analogous configuration parameters for LPT2 device.
Provides analogous configuration parameters for LPT3 device.
Enables and sets parameters for LPT4 device operation.
Defines wait time before increasing process priority level.
Configures memory allocation policy.
Establishes default DOS memory allocation method.
Defines menu options available during boot or configuration.
Specifies menu color schemes (can be emulated under DR-DOS).
Sets which menu block is default (emulatable in DR-DOS).
Defines various menu blocks (emulatable under DR-DOS).
Enables or disables multitrack disk operations support.
Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default No () character used in Yes/No/Resume prompts.
Controls whether Num Lock is turned on or off at startup on the keyboard.
Enables conditional execution based on the last error code, such as .
Displays text and waits for a key press, functioning similarly to DR-DOS’s and .
Requires user confirmation of errors encountered during CONFIG.SYS processing.
Configures buffer sizes assigned to LPT ports.
Enables conditional command execution on PC-compatible machines only.
Sets priority level for task scheduling purposes.
Adjusts disk I/O priority assigned to applications.
Changes internal default printer assignment among LPT1 through LPT4 devices.
Determines whether DOS programs are permitted to run under current settings.
Loads a user interface shell environment.
Enables conditional execution specific to IBM PS/1-compatible hardware platforms.
Enables conditional execution specific to IBM PS/2-compatible hardware platforms.
Suppresses output sent to STDOUT display.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters reserved by local block device drivers.
Sets the default Resume () response character for Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command location, optionally passing a return code.
Defines the size of real mode memory available.
Enables concurrent loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Determines storage location for the initial character of deleted files within the FAT reserved area.
Configures video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Sets the status of the keyboard Scroll Lock key, either on or off.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter to reserve memory for relocating COMMAND.COM, optimizing memory usage when employing third-party shells.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files close automatically upon pressing Ctrl+Alt+Del.
Bypasses POST during system reboot.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes and buffer loading across various DOS platforms and versions.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Commands in PTS-DOS for managing boot processes, system load addresses, and optimizing memory utilization.
, SWITCH, SWITCHES
Enable conditional processing within CONFIG.SYS and provide special options across multiple DOS variants.
, SWAPPATH, THREADS, TIMESLICE
OS/2 directives controlling error log suppression, swap file location, thread count configuration, and scheduler time slice settings.
, TRACE, TRACEBUF
Manage timeout durations and enable single-step execution tracing in CONFIG.SYS/AUTOEXEC.BAT on DR-DOS, PTS-DOS, OS/2, and FreeDOS systems.
Additional commands include TMPEXT for specifying temporary file extensions (PTS-DOS) and SXFAKEHWFPU addressing hardware bugs in OS/2 Warp.

UTemplate:NbndZ

Assigns a specific segment to be used as an Upper Memory Block (UMB).
Configures the Upper Memory Block server parameters.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to applications.
Controls VGA display status settings.
Specifies the current video mode, comparable to FreeDOS's SCREEN command.
Enables utilization of virtual DMA channels.
Manages processor Virtual Mode Extensions (VME) functionality.
Configures VxD drivers for Windows environments.
Sets system support parameters for Windows operation.
Manages relocation of the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware platforms.
Configures built-in Year 2000 compliance support features.
Defines the default affirmative response character used in prompts.
Controls tracking behavior for file deletions.

Issues

Although booting is possible without CONFIG.SYS or AUTOEXEC.BAT files, these remain crucial for customizing DOS behavior and fulfilling software dependencies. Troubleshooting is necessary if these files become corrupted or damaged.

In cases where CONFIG.SYS lacks a SHELL directive—or if it is missing or corrupted—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier versions prior to 6.0 will fail if COMMAND.COM is absent. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later will prompt users to specify a command interpreter path. This prompt also appears if the primary shell terminates unexpectedly or exits voluntarily, allowing limited runtime shell substitution without requiring a reboot.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS systems. DR-DOS typically inhibits bypassing SHELL directives when using skip/trace/step modes to enhance system stability during boot failures. If no valid shell file is found while skipping CONFIG.SYS processing, users are prompted to enter a suitable shell filename.

CONFIG.SYS size restrictions vary: MS-DOS/PC DOS limits it to a few kilobytes (up to approximately 64 KB in recent versions), whereas DR-DOS imposes no fixed limit other than file system constraints. MS-DOS compiles CONFIG.SYS into tokenized memory structures for sequential processing. In contrast, DR-DOS interprets CONFIG.SYS line-by-line at runtime, providing fine-grained control over driver and TSR loading order through DEVICE and INSTALL commands. This approach facilitates resolving load conflicts and integrating temporary software during boot.

The maximum length of SHELL command lines varies by version: MS-DOS/PC DOS versions between 2.0 and 4.01 restrict it to 31 characters. Later versions expand this limit up to 128 characters, while DR-DOS supports up to 255 characters. Notably, CONFIG.SYS directives do not accommodate long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed on a system already running DOS or an earlier Windows version, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming supports dual-boot functionality between Windows 9x and DOS. Selecting the DOS boot option temporarily reinstates these files as CONFIG.SYS and AUTOEXEC.BAT, while the original Windows 95 versions are saved under the names CONFIG.W40 and AUTOEXEC.W40.

For systems running Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT retain their default names. Meanwhile, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT to manage its startup processes.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS to load drivers and set up the environment prior to launching its graphical interface.

Within the OS/2 environment embedded in Windows NT, what OS/2 applications recognize as CONFIG.SYS is actually maintained within the system registry.

There exists a variety of undocumented CONFIG.SYS commands specific to OS/2.

CONFIG.SYS continues to be employed by OS/2-based operating systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
  • Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
  • Guide to FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
  • Unofficial German PTS-DOS FAQ including CONFIG.SYS information (archived)