ERROR (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating system software |
| Founded | 1983 |
| Headquarters | N/A |
| Products | System configuration commands for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file within DOS and OS/2 operating system environments. This plain text file, written in ASCII, includes configuration commands accessible to users that the operating system's DOS BIOS interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.
Typically, the file contains name=value pairs that define system parameters or load components like device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants employ alternative filenames that take precedence over CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 utilize CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These platforms support advanced configuration data stored in binary files such as CCONFIG.BIN, which can be edited using CONFIG.EXE.
In DR DOS versions 3.31 onward, alternative configuration files like DCONFIG.SYS (DR-DOS), ODCONFIG.SYS (OpenDOS), and DRCONFIG.SYS exist to facilitate multi-boot configurations and compatibility with disk compression utilities. The SYS /DR:ext command permits customization of default file extensions to maintain multiple system files concurrently in one root directory, selectable through boot managers like LOADER.
From DR-DOS 6.0 forward, enhancements to the SHELL directive allow specification of different AUTOEXEC.BAT files and support extensions beyond .BAT—a capability also available in 4DOS. Additionally, the CHAIN=filespec command enables continuation of processing in external configuration files, optionally targeting specific labeled sections.
FreeDOS employs FDCONFIG.SYS, RxDOS uses RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS for analogous purposes.
In Windows 95 and Windows 98, CONFIG.SYS and AUTOEXEC.BAT remain present in the root directory of the boot drive but are generally left empty. In contrast, Windows Me does not interpret CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry.
Within FlexOS, CONFIG.SYS takes the form of a binary file that specifies resource managers and device drivers to be loaded at boot time.
Example
Below is a sample CONFIG.SYS file 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 within CONFIG.SYS serving as jump points for , , , , and commands.
- Functions similarly to , also utilized for inline commentary following other directives. (Note that under MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used alongside ; to begin inline comments.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. Starting with DOS 6.0, a comparable feature is available by appending after directives (e.g., ).
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Configures which drives record file access timestamps within FAT directory entries.
- Executes conditionally only on AT-compatible systems.
- Manages the boot process.
- Adjusts the level of detail shown in error messages.
- Alters the default internal serial driver assigned to the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads the foundational device driver into system memory.
- Produces a brief beep sound even if audible alerts are turned off.
- Defines which operating system will be loaded next during boot.
- Enables or disables extended checking for Ctrl+C interrupts.
- Specifies how many disk buffers should be allocated.
- Similar to BUFFERS but allocates buffers in HMA or UMB memory areas.
- , , (Embedded DOS 6-XL exclusive)
- Sets cache parameters to enhance system performance.
- Executes programs listed in CONFIG.SYS, pausing further processing until completion.
- (DR-DOS 7.02+)
- Controls the Caps Lock key status on the keyboard.
- , (PTS-DOS specific)
- Configures CD-ROM driver settings and buffer sizes.
- (DR DOS 5.0+ and Embedded DOS)
- Continues processing CONFIG.SYS from a different file or label location.
- , , and other related directives primarily adjust hardware or interface configurations, especially within PTS-DOS or DR-DOS systems.
- , (OS/2 only)
- Specifies OEM codepages to support internationalization features.
- , ..., (DR-DOS 7.02+)
- Defines and configures serial communication ports (COM ports).
This collection of directives demonstrates the high degree of customization available in DOS-based operating systems, allowing precise control over hardware management and boot operations—an essential aspect for enterprise environments that depend on legacy software compatibility and system tuning.
DTemplate:NbndF
- Adjusts relocation settings for drive descriptor tables.
- Defines the memory segment address used for multi-sector disk data deblocking operations.
- Activates support for an internal debugger tool.
- Controls boot management functions.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Sets country and codepage configurations for keyboard, screen, and printer devices.
- Specifies cache memory size allocations.
- Determines compatibility mode for floppy disk drives.
- Selects the display font used by the system.
- Manages loading of DOS into high memory and utilization of upper memory areas (similar to in DRDOS 5.0).
- Loads DOS-related tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
- Defines an alternative directory path for DOS system files.
- Establishes search paths for data files.
- Sets physical parameters for recognized disk drives.
- Provides parameter definitions for unrecognized disk drives.
- Refer to .
- Enables error logging via PDUMP.nnn files and designates target drive for logs.
- Displays standard messages on the screen during operation.
- Enables message display including ANSI escape sequences for enhanced formatting.
- Specifies additional verification checks when launching programs.
- Sets error or return codes applicable to following commands in batch processing.
- Controls the A20 gate state during program startup sequences.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives.
- Defines hash table size to speed up file opening operations, differing from MS-DOS/PC DOS FASTOPEN implementation.
- Specifies how many File Control Blocks can be cached open simultaneously (shares buffer space with FILES under DR-DOS).
- Functions like FCBS but loads File Control Blocks into upper memory areas.
- Boot manager directive controlling system startup behavior.
- Sets maximum number of files that can be opened concurrently.
- Similar to FILES but allocates open file handles in upper memory blocks.
- Allows inclusion of specific CONFIG.SYS subsections during execution (see IGNORE).
GTemplate:NbndI
- Waits for a keypress or timeout, setting the error level to the ASCII code or 1024 if timed out.
- Resumes CONFIG.SYS processing at a designated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
- Refer to , , or for details.
- Consult for additional information.
- See for further reference.
- Refer to or as needed.
- See or for more details.
- Consult for related information.
- Loads a TSR program after relocating the DOS data segment; compare with INSTCDEX.
- See , , or for related commands.
- Refer to for additional context.
- See or for further explanation.
- Activates console and command line history buffers with enhanced pattern search capabilities.
- Defines the address of the HMA segment.
- Configures the HLT power-saving mode.
- Enables checking of boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits certain applications to operate at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated via GOSUB/RETURN in DR-DOS).
- Sets the keyboard Insert mode state.
- Installs a TSR program into memory.
- Loads TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR after DOS data segment relocation; see also INSTCDEX.
- Adjusts PIC interrupt priorities to assign highest priority to a selected IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the address of the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists paths for DLL searches.
- Controls legacy program compatibility handling.
- Determines the number of file locks allowed.
- Configures boot logo display when using PTS-DOS boot manager.
- Specifies count, sequence, I/O address, and timeout for LPT1 device configuration.
- Applies LPT1 settings equivalently to LPT2 device.
- Mirrors LPT1 configuration for LPT3 device.
- Enables and configures LPT4 device similarly to others.
- Sets delay time before priority boosting occurs in processes.
- Defines memory allocation strategy parameters.
- Establishes default DOS memory allocation approach.
- Specifies menu option settings.
- Determines menu color schemes (can be emulated using ECHO under DR-DOS).
- Sets default menu block (emulatable via TIMEOUT and SWITCH commands in DR-DOS).
- Defines various menu blocks (emulatable through ECHO and SWITCH under DR-DOS).
- Enables operations involving multitrack disks.
- Continues CONFIG.SYS processing from an external file, optionally loading a driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character response in Yes/No/Resume prompts.
- Specifies whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
- Executes conditionally based on the last command’s return code or error status, e.g., .
- Similar to and , displays text and waits for a key press before proceeding.
- Requires user confirmation upon encountering errors in CONFIG.SYS processing.
- Configures buffer size settings for LPT ports.
- Executes conditionally on PC-compatible systems only.
- Adjusts scheduler priorities accordingly.
- Sets priority levels specifically for disk I/O programs.
- Changes default printer device driver assignment (from LPT1 to LPT3 or LPT4) used by PRN device reference.
- Defines whether DOS applications are permitted to run in the environment.
- Loads a user interface module if specified.
- Executes conditionally on IBM PS/1-compatible systems only.
- Executes conditionally on IBM PS/2-compatible systems only.
- Suppresses output directed to STDOUT display.
RTemplate:NbndT
- Determines whether the system should automatically reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Reserves a specific drive letter from local block device drivers.
- Sets the default Resume () response character for Yes/No/Resume prompts.
- Returns nested CONFIG.SYS execution to the previous GOSUB or SWITCH point, optionally with a return code.
- Defines the size of real mode memory.
- Functions like CALL but initiates concurrent program loading in CONFIG.SYS in the background.
- Indicates if the first character of deleted files is stored in the FAT reserved area.
- Specifies video mode under FreeDOS or screen access methods under PTS-DOS.
- Sets the state of the keyboard Scroll Lock key (on or off).
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, preventing fragmentation.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed when Ctrl+Alt+Del is pressed.
- Configures whether POST is bypassed during reboots.
- Specifies the number of stacks allocated for hardware interrupts.
- Sets the default stack size for new threads.
- Functions like STACKS but explicitly loads buffers into upper memory.
- Manages boot manager settings.
- Controls behavior of the XMS A20 gate.
- Defines submenu blocks (emulatable in DR-DOS).
- Redirects error logging to a drive instead of displaying popups.
- Specifies the path for swap files.
- {{{{{{{{{{{{{{{
(DR DOS 6.0+) : Allows conditional continuation of nested CONFIG.SYS processing at designated labels based on key presses, with RETURN reverting to the prior location.
(DOS 2.0-2.1, DOS Plus 2.1 with FIDDLOAD, DR-DOS 7.02+, PTS-DOS, FreeDOS, RxDOS): Sets default SwitChar ('/' or '-').
(DOS 4.0, Novell DOS 7+): Defines special options (ignored by PTS-DOS).
(OS/2 Warp 4 FixPak 1+): Enables fix addressing FPU rounding errors.
(PTS-DOS only): Specifies an alternative DOS OS filename for booting.
(PTS-DOS only): Configures memory locations for DOS components.
(PTS-DOS only): Boots system from an alternate disk area.
(Embedded DOS 6-XL): Defines size of system memory pool used for dynamic allocations.
(PTS-DOS only): Loads DOS data and code into UMBs if specified.
(OS/2 only): Sets number of simultaneous threads allowed.
(DR-DOS 6.0+, PTS-DOS): Establishes timeouts for CONFIG.SYS single-stepping and default answers for queries/selections (PTS-DOS supports timeout values only).
(OS/2 only): Configures minimum and maximum scheduler time slices.
(PTS-DOS only): Specifies temporary file extension used by the system.
(DR-DOS 7.02+, PTS-DOS, OS/2): Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally—functionality varies between OS/2 and DOS versions.
(OS/2 only): Sets TRACE log buffer size.
(OS/2 3.0+): Records detailed error information upon traps.
UTemplate:NbndZ
- Directs DOS to utilize a particular segment as an Upper Memory Block (UMB).
- Designates which UMB server is active.
- Defines address ranges allocated for UMB RAM usage.
- Toggles disk write verification on or off.
- Sets the DOS version reported to applications.
- Manages VGA display status settings.
- Specifies the current video mode configuration.
- Enables use of virtual DMA functionality.
- Controls processor Virtual Mode Extensions (VME) features.
- Configures VxD drivers within Windows environments.
- Adjusts Windows system support parameters.
- Manages relocation of Extended BIOS Data Area (EBDA).
- Executes conditionally on XT-compatible hardware platforms.
- Configures built-in Year 2000 compliance support.
- Sets default affirmative response character for prompts.
- Monitors driver deletion events.
Issues
Although a system can start without the presence of CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive operating system customization and meeting software prerequisites. When these files become damaged or corrupted, troubleshooting becomes necessary.
If the CONFIG.SYS file does not include a SHELL directive or is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 cannot boot without this file. Starting with MS-DOS 6.0, PC DOS 6.1, Novell DOS 7, and later releases, users are prompted to provide the path to a command processor if COMMAND.COM is missing or fails to load. This feature enables limited shell replacement during runtime without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which impacts dual-boot configurations where COMMAND.COM resides on drive C:. DR-DOS versions 7.02 and above enforce SHELL directives during skip, trace, and step modes, requesting valid shell names if none are specified before launching COMMAND.COM.
The maximum size allowed for CONFIG.SYS varies between systems: MS-DOS and PC DOS impose limits of a few kilobytes (with recent versions permitting up to 64 KB), whereas DR-DOS imposes no fixed size restriction beyond the limits of the underlying file system. MS-DOS processes CONFIG.SYS by compiling it into tokenized memory and executing directives in a predetermined sequence (loading device drivers before TSRs). In contrast, DR-DOS interprets CONFIG.SYS line-by-line, offering granular control over loading order and enabling conditional execution based on hardware detection or error conditions—features that aid in conflict resolution or debugger integration.
DR-DOS also incorporates an INSTALL directive that allows non-resident programs to be executed within the CONFIG.SYS processing flow, enhancing its adaptability.
Earlier MS-DOS versions restricted the length of the SHELL command line to 31 characters; subsequent editions expanded this limit to 128 characters, while DR-DOS supports up to 255 characters. It should be noted that 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 original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming facilitates dual-boot functionality between Windows 9x and DOS by temporarily restoring these filenames when booting into DOS mode. The Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40 as backups.
In scenarios where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS utilizes its own startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem embedded in Windows NT, the CONFIG.SYS configuration accessed by OS/2 applications is actually stored within the Windows registry.
There exist several undocumented CONFIG.SYS directives used internally by OS/2.
CONFIG.SYS continues to be a fundamental component in OS/2-based derivatives such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- AUTOEXEC.BAT and CONFIG.SYS details – Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives
- Reference for CONFIG.SYS commands – Caldera (DR-DOS 7 directive descriptions)
- Documentation on FreeDOS CONFIG.SYS directives
- PTS-DOS 2000 Pro User Manual including PTS-DOS CONFIG.SYS commands
- Unofficial German PTS-DOS FAQ (PTS/FAQD), dated April 25, 2004, containing additional CONFIG.SYS directives