Jump to content

COMAREA (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article COMAREA (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration commands for DOS and OS/2

CONFIG.SYS serves as the essential configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, holds configuration commands accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the boot sequence. The CONFIG.SYS file was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS customize DOS settings related to hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified on the SHELL line; if none is defined, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

Typically, CONFIG.SYS contains name=value entries that establish configurable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into system memory.

In DOS environments, this file is located in the root directory of the active boot drive.

The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.

Certain DOS derivatives recognize alternate filenames that override CONFIG.SYS:

Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 replace CONFIG.SYS with CCONFIG.SYS. Multiuser DOS may alternatively use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms support extended configuration options stored in binary files like CCONFIG.BIN, which are generally modified through CONFIG.EXE.

In versions such as DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 and later, DCONFIG.SYS takes priority over CONFIG.SYS. Originally associated with disk compression utilities, this naming convention facilitates managing multiple configurations in systems with multi-boot setups.

OpenDOS 7.01 and DR-OpenDOS 7.02 also detect ODCONFIG.SYS, while some DR-DOS releases search for DRCONFIG.SYS. Since DR DOS 6.0, the command SYS /DR:ext enables renaming of system and configuration files to maintain several concurrent boot configurations within a single root directory, selectable via boot loaders like LOADER included with Multiuser DOS and DR-DOS 7.x.

The SHELL command supports pointing to alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT"—capabilities likewise supported by 4DOS. Starting with DR-DOS 6.0, the CHAIN=filespec directive allows continuation into another configuration file that may reside outside the root folder; from version 7.02 onward, it is possible to jump directly to a labeled section within that file.

With DR-DOS 7.03 and newer versions, the SYS /A option was introduced to copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

Among other variants, FreeDOS employs FDCONFIG.SYS; RxDOS version 7.24 and above uses RXCONFIG.SYS; while PTS-DOS utilizes CONFIG.PTS.

Due to their foundation on DOS, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of Windows 95 and Windows 98 boot drives but are generally left empty.

Windows Me does not process CONFIG.SYS during startup; instead, environment variables are loaded from the Windows Registry located at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during system initialization.

Example

Here is a sample CONFIG.SYS configuration 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>

:;*?!

Marks labels as jump destinations for , , , , and commands.
Functions similarly to , permitting inline comments following other commands. (Note that MS-DOS/PC DOS handles inline comments differently when enclosed in quotes.)
Allows inline comments alongside the ; directive.
Presents a Yes/No prompt to confirm whether to execute subsequent commands.[1] While FreeDOS does not support optional messages, it does allow conditional execution with boot menus via and . DOS 6.0 and later versions provide comparable confirmation by appending to directives, e.g., .
Executes the next command without condition.

ATemplate:NbndC

Enables program abortion upon error occurrence.
Sets drives to record file access timestamps within FAT directory entries.
Executes commands conditionally on AT-compatible hardware.
Boot manager functionality.
Adjusts verbosity level of error messages.
Changes the default serial driver assigned to the AUX device.
Prevents character devices outside the virtual \DEV directory from loading.
Loads a fundamental device driver into memory.
Produces a beep sound even if notifications are disabled.
Specifies which operating system to boot next.
Toggles extended Ctrl+C checking on or off.
Defines the quantity of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, , (Embedded DOS 6-XL exclusive)
Controls cache size and the timing of cache flushes.
Loads specified programs in CONFIG.SYS and pauses processing until they complete.
Sets the Caps Lock state on the keyboard.
, (PTS-DOS exclusive)
Configures CD-ROM drivers.
Continues processing CONFIG.SYS from another file or label.
, , and additional PTS-DOS specific commands adjust system behavior and display settings.
(OS/2 only)
Assigns OEM codepages for international language support.
(DR-DOS 7.02+)
Configures COM port quantity, order, I/O addresses, and timeout parameters.

[Additional directives omitted here for brevity.]

DTemplate:NbndF

Manages relocation of drive descriptor tables in memory.
Defines memory segment address for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot manager functionality.
Loads device drivers into conventional memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Configures sizes of cache memory buffers.
Selects floppy disk compatibility mode settings.
Specifies the display font used by the system.
Controls whether DOS loads into high or upper memory regions (similar to in DRDOS 5.0).
Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory segments.
Defines an alternate directory path for DOS system files.
Sets search paths for locating data files.
Specifies physical drive parameters such as geometry and characteristics.
Defines configuration parameters for unrecognized or unknown drives.
See .
Enables PDUMP.nnn error logging and designates the drive used for these logs.
Outputs a text message on screen during boot or processing.
Displays a message that includes ANSI escape sequences for formatting.
; Specifies whether additional validation checks occur when launching programs.
; Assigns an assumed error or return code for subsequent operations or commands.
; Determines the A20 gate status upon program startup.
; Terminates CONFIG.SYS processing prior to reaching the end of the file (except directives like SWITCHES and SHELL).
; Sets hash table size used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
; Defines how many File Control Blocks (FCBs) can be opened simultaneously (shares buffer space with FILES under DR-DOS).
; Similar to FCBS but explicitly loads FCBs into upper memory areas.
; Boot manager capabilities.
; Specifies maximum number of files that can be open simultaneously by the system.
Same as FILES but loads file handles explicitly into upper memory segments.
Includes execution of specific CONFIG.SYS subsections (refer to IGNORE directive).

GTemplate:NbndI

Waits for a keystroke or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing from a specified label, then returns to the prior point.
Refer to , , or for additional details.
See further information in .
Consult for related usage.
Reference or for more context.
See or for additional guidance.
Consult for further explanation.
Loads a TSR program into memory similarly to , but after relocating the DOS data segment.
See , , or for related commands.
Additional details available in .
Refer to or for further instructions.
Activates console and command line history buffers with advanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures HLT (halt) mode for power saving.
Determines whether the system checks boot sectors for viruses.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits selected programs to operate at ring 2, enabling direct hardware I/O access.
Incorporates directives from another menu block (can be emulated using GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs a TSR program into memory.
Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Installs a TSR program following relocation of the DOS data segment.
Adjusts PIC interrupt priorities to give precedence to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the relocated keyboard buffer address.
Specifies the maximum number of accessible drives.
Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
Lists directories to search for DLL files.
Manages compatibility with legacy software.
Determines the number of file locks allowed.
Controls boot logo display when using PTS-DOS boot manager.
Configures count, order, I/O port, and timeout parameters for LPT1 device.
Applies LPT1 settings similarly to LPT2 device.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 device in like manner.
Sets delay before elevating process priority.
Specifies memory allocation methods used by DOS.
Defines default DOS memory allocation strategy.
Establishes menu options available at boot time.
Sets menu color schemes (emulatable via ECHO command in DR-DOS).
Specifies default menu block (can be emulated with TIMEOUT and SWITCH commands in DR-DOS).
Defines individual menu blocks (emulatable through ECHO and SWITCH commands in DR-DOS).
Enables support for multitrack disk operations.
Continues CONFIG.SYS execution from a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () response character in Yes/No/Resume dialogs.
Specifies initial status of keyboard [[Num Lock|Template:Keypress]] as on or off.
Enables conditional execution based on previous error code (e.g., ).
Displays text and waits for key press, similar to and commands in DR-DOS environments.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Enables conditional execution on PC-compatible hardware only.
Sets scheduler priority level for processes.
Defines priority for disk I/O tasks.
Changes default printer device driver assignment (for example, switching from LPT1 to LPT3 or LPT4).
Specifies whether DOS applications are permitted to run.
Loads a user interface shell environment.
Enables conditional execution on IBM PS/1-compatible systems only.
Enables conditional execution on IBM PS/2-compatible systems only.
Suppresses output sent to STDOUT display.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates drive letters reserved for local block device drivers.
Defines the default Resume () character used in Yes/No/Resume prompts.
Returns nested CONFIG.SYS processing flow to the preceding GOSUB or SWITCH statement, optionally with a return code.
Specifies the size of real mode memory.
Allows simultaneous background loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands under DOS.
Saves the initial character of deleted files within a reserved FAT area.
Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Controls the keyboard Scroll Lock state, enabling or disabling it.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, optimizing memory usage when using third-party shells.
Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Manages file closure behavior when Ctrl+Alt+Del is pressed.
Skips the Power-On Self-Test (POST) during system reboot.
, STACKSIZE, STACKSHIGH
Configure stack sizes across various DOS implementations, focusing on interrupt stack allocation and upper memory loading where applicable.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific commands that handle boot manager settings, alternative boot file usage, memory address configurations, and loading DOS components into upper memory blocks to enhance efficiency.
, SUPPRESSPOPUPS, SWAPPATH
OS-specific instructions for managing menu block behavior, specifying error log drives, and defining swap file locations to improve system customization and error handling.
, SWITCHES, SWITCHAR
Enable conditional processing of CONFIG.SYS based on keyboard input or system options, allowing customization of switch characters ('/' or '-') across multiple DOS variants.
, TIMESLICE
Adjusts timeout intervals for CONFIG.SYS operations and scheduler time slices under DR-DOS, PTS-DOS, and OS/2 environments.
, TRACE, TRACEBUF
Control temporary file extensions and activate tracing or logging of CONFIG.SYS execution for debugging purposes on supported platforms.
, THREADS
OS/2-specific directives that provide detailed error logging and manage concurrent threads to improve system stability and multitasking performance.

UTemplate:NbndZ

Assigns a specific segment as an Upper Memory Block (UMB) for DOS usage.
Defines the UMB server configuration.
Specifies address ranges allocated for UMB RAM.
Toggles disk write verification on or off.
Sets the DOS version reported to applications.
Configures VGA display status parameters.
Establishes the current video mode similarly to FreeDOS's SCREEN command.
Enables virtual DMA capabilities.
Controls activation of Virtual Mode Extensions (VME).
Configures Virtual Device Driver settings for Windows environments.
Manages Windows system support parameters.
Handles relocation of the Extended BIOS Data Area (EBDA).
Executes commands conditionally on XT-compatible hardware platforms.
Enables integrated Year 2000 compliance support.
Defines the default character used for Yes responses in prompts.
Tracks deleted files within the system.

Issues

Although it is possible for the system to start without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files are crucial for full operating system customization and meeting software dependencies. When these files are damaged or missing, troubleshooting becomes necessary.

In cases where CONFIG.SYS does not contain a SHELL directive or is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to DOS 6.0 will fail to boot if COMMAND.COM cannot be found. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command processor path if COMMAND.COM is unavailable. They also provide recovery options if the primary shell fails or terminates unexpectedly. This feature facilitates replacing the shell at runtime without requiring a reboot.

Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS variants, DR-DOS 7.02 and newer enforce SHELL directives during skip/trace/step modes to prevent bypassing them. This enhances stability when using dual-boot configurations. Some subsequent releases introduced mechanisms that recover from invalid SHELL arguments by reapplying skip behavior and prompting users for valid shell filenames before loading COMMAND.COM.

The maximum size of CONFIG.SYS under MS-DOS/PC DOS is limited to 64 KB, whereas DR-DOS imposes no specific size restriction beyond filesystem limits. MS-DOS compiles CONFIG.SYS into a tokenized in-memory structure that organizes directives by category—loading device drivers before TSR programs. Conversely, DR-DOS processes directives sequentially line-by-line, granting more granular control over the load order of drivers and TSRs through DEVICE and INSTALL commands. This approach assists in resolving conflicts during loading and allows temporary external programs to be integrated into the boot sequence.

Earlier MS-DOS versions restricted SHELL command lines to 31 characters in length. Later versions expanded this limit up to 128 characters, while DR-DOS supports up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual-boot functionality. During a DOS boot, these files temporarily switch back to their original filenames. Additionally, backup copies of Windows 95's configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT remain intact, while DR-DOS utilizes separate startup files named DCONFIG.SYS and AUTODOS7.BAT for its boot process.

OS/2 and Windows NT

OS/2 depends extensively on CONFIG.SYS to load drivers and set the environment before launching its graphical user interface. Within the OS/2 subsystem on Windows NT, these CONFIG.SYS configurations are maintained within the system registry instead of traditional file storage.

Numerous CONFIG.SYS commands in OS/2 lack thorough documentation or remain undocumented. Despite this, the file continues to be a crucial component in OS/2-based distributions 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; partial DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS directive descriptions
  • PTS-DOS 2000 Pro User Manual featuring CONFIG.SYS directives (partial)
  • Unofficial German PTS-DOS FAQ with CONFIG.SYS directives (archived)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG