ERREXE (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration commands for DOS and OS/2 startup |
CONFIG.SYS serves as the main 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—interprets during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS set up DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL line; if none is specified, it defaults to COMMAND.COM, which then executes the instructions in the AUTOEXEC.BAT file.
This configuration file primarily consists of name=value entries that specify parameters or load essential components such as device drivers and terminate-and-stay-resident programs (TSRs). In DOS environments, CONFIG.SYS is located in the root directory of the drive used for booting.
The name CONFIG.SYS is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS derivatives check for alternative filenames that override CONFIG.SYS:
Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 utilize CCONFIG.SYS instead of CONFIG.SYS. Some versions of Multiuser DOS employ CCONFIG.INI, whereas REAL/32 searches for MCONFIG.SYS. These platforms often maintain supplementary configuration details in binary files such as CCONFIG.BIN, which are generally edited using CONFIG.EXE.
In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS releases 7.02 and later, DCONFIG.SYS takes precedence over CONFIG.SYS. This naming convention facilitates disk compression scenarios where drive letter assignments change after compression drivers load and assists with multi-boot configurations. OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS editions look for DRCONFIG.SYS.
Starting with DR DOS 6.0, the SYS /DR:ext command enables customization of default system file extensions, allowing multiple system setups to coexist within a single root directory and be selected via boot loaders such as LOADER. The SHELL command supports alternative AUTOEXEC.BAT files through the option /P[:filename.ext]. Additionally, DR-DOS includes a CHAIN=filespec[,label] directive that permits continuation of configuration processing from another file located even outside the root directory.
From version 7.03 onward, DR-DOS offers a SYS /A switch to copy both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
FreeDOS employs FDCONFIG.SYS, whereas RxDOS version 7.24 and above uses RXCONFIG.SYS. The operating system PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98 (both DOS-based), CONFIG.SYS and AUTOEXEC.BAT files are present but generally left empty. Windows Me does not interpret CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers to be loaded at boot time.
Example
Below is a sample CONFIG.SYS for MS-DOS version 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>
:;*?!
- Used to define labels within CONFIG.SYS serving as jump points for , , , , and commands.
- Functions similarly to , but additionally supports in-line comments following other directives. (In MS-DOS/PC DOS, inline comments behave differently when enclosed in double quotes.)
- Serves as a leading character for in-line comments alongside the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. Starting with DOS 6.0, a similar feature is available by appending a suffix to the directive.
- Forces execution of the next CONFIG.SYS directive without condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets drives to record file access timestamps within FAT directory entries.
- Enables conditional execution on AT-compatible computer systems.
- Manages boot loading functionality.
- Adjusts the verbosity level of error messages.
- Alters the default serial port driver (COM1: through COM4:) associated with the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a fundamental device driver into memory.
- Produces a brief beep sound, regardless of notification settings.
- Specifies which operating system to boot next.
- Enables or disables enhanced Ctrl+C detection.
- Defines the quantity of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into HMA or UMB regions.
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Adjust cache block allocation and flushing parameters.
- Executes programs within CONFIG.SYS, pausing processing until completion.
- Sets the Caps Lock status of the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver and its buffer settings.
- Continues CONFIG.SYS processing from a specified new file or label.
- , CLS, CODEPAGE (PTS-DOS and OS/2)
- Define clock type, clear display screen, and set OEM codepages.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Configure COM port devices including I/O addresses and timeout values.
- , COMMENT, COUNTRY (various DOS versions)
- Set DMA buffers, redefine comment characters, and enable internationalization support.
- , CPSW (MS-DOS and DR-DOS versions)
- Control cursor display position and codepage switching capabilities.
- , CPU88, CPU86, CPU286, CPU386, CPU486 (PTS-DOS and DR-DOS)
- Execute conditionally based on CPU model or clock speed.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Specifies memory segment address used for multi-sector disk data deblocking.
- Activates internal debugger functionality support.
- Boot manager component.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
- Configures country and codepage information for keyboard, screen, and printer devices.
- Defines cache memory size parameters.
- Sets compatibility mode for floppy disk drives.
- Specifies font used for display output.
- Controls loading of DOS into high memory and utilization of upper memory areas.
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory segments.
- Defines an alternate path location for DOS files.
- Sets search paths for data files used by DOS utilities.
- Defines physical characteristics of disk drives connected to the system.
- Establishes parameters for drives that are not natively recognized by the system.
- Refer to .
- Enables creation of PDUMP.nnn error log files on a specified drive.
- Displays a message on the screen during processing.
- Displays messages incorporating ANSI escape sequences for formatting effects.
- Adds extra validation checks when launching programs.
- Specifies an assumed error or return code value for certain operations.
- Controls the A20 line gate state when starting executable programs.
- Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL under certain conditions.
- Defines hash table size to optimize file open operations differently from MS-DOS/PC DOS FASTOPEN driver behavior.
- Sets maximum number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer with FILES in DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory area.
- Boot manager component handling multiple OS options or configurations.
- Specifies maximum number of files allowed open at once by the system.
- Like FILES but loads file handles explicitly into upper memory blocks.
- Includes execution of designated CONFIG.SYS subsections as defined by IGNORE directive.
GTemplate:NbndI
- Awaits a key press or timeout, assigning 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 execution at a specified label, then returns to the prior location.
- Refer to , , or for additional details.
- Consult for further information.
- See for related instructions.
- Refer to or for more context.
- Consult or for additional guidance.
- See for further explanation.
- Loads a terminate-and-stay-resident (TSR) program into memory following DOS data segment relocation; compare with INSTCDEX.
- Refer to , , or for related commands.
- Consult for more information.
- See or for additional details.
- Activates console and command line history buffer with enhanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures the HLT instruction for energy-saving mode.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Permits programs 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 status of the keyboard Insert mode.
- Loads a TSR program into memory.
- Loads a TSR program into upper memory area, similar to HIINSTALL in DR DOS 5.0.
- Installs a TSR program post-DOS data segment relocation; see also INSTCDEX.
- Adjusts PIC controller interrupt priorities to prioritize a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated keyboard buffer's memory address.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory instead.
- Lists directories searched for DLL files.
- Manages backward compatibility with legacy software.
- Determines the quantity of file locks allowed.
- Configures boot logo display settings when using PTS-DOS boot manager.
- Sets parameters such as count, order, I/O address, and timeout for the LPT1 port.
- Applies similar configuration settings to LPT2 device.
- Configures LPT3 device in like manner.
- Enables and sets parameters for LPT4 device operation.
- Specifies delay before elevating priority of a waiting process.
- Defines strategy for memory allocation management.
- Sets default DOS memory allocation approach.
- Establishes menu option definitions.
- Specifies color schemes for menus, emulatable under DR-DOS environment.
- Assigns default menu block, which can be emulated in DR-DOS systems.
- Defines individual menu blocks, compatible with DR-DOS emulation techniques.
- Enables or disables multitrack disk operation functionality.
- Continues CONFIG.SYS processing within a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Assigns default character for 'No' response in Yes/No/Resume prompts ( ).
- Controls status of keyboard Num Lock key on startup.
- Executes commands conditionally based on errorlevel values, e.g., .
- Shows a message and waits for keypress, akin to DR-DOS's and .
- Requires user confirmation upon encountering errors in CONFIG.SYS processing.
- Sets buffer size parameters for LPT port communication.
- Enables conditional execution on PC-compatible hardware platforms.
- Configures scheduler process priority levels.
- Sets priority specifically for disk I/O operations programs.
- Alters default printer device driver assignment (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to run.
- Loads user interface shell environment during startup.
- Enables conditional execution on IBM PS/1-compatible systems only.
- Allows conditional execution on IBM PS/2-compatible machines exclusively.
- Suppresses output sent to standard output (STDOUT).
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
- Allocates a drive letter for local block device drivers.
- Establishes the default Resume () character displayed in prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH location, optionally with a return code.
- Sets the size of real mode memory.
- Allows programs listed in CONFIG.SYS to load simultaneously in the background, functioning similarly to CALL or INSTALL commands in DOS.
- Determines whether the first character of deleted files is stored in the reserved area of FAT directory entries.
- Specifies video mode settings for FreeDOS or screen access methods under PTS-DOS.
- Manages the Scroll Lock key status on the keyboard.
- Defines environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, reducing fragmentation.
- Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files are closed when a Ctrl+Alt+Del interrupt occurs.
- Bypasses POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Configure hardware interrupt stack sizes and buffer loading into upper memory across various DOS variants (implementation details differ).
- Configures the boot manager.
- , STUBA20
- Reserved for internal use or hardware control settings specific to PTS-DOS.
- Defines submenu blocks available in DOS 6.0 and above (unsupported by DR-DOS and FreeDOS).
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific parameters managing error logging, swap file locations, threading behavior, and scheduler time slices.
- , SWITCHES
- Directives for conditional processing within CONFIG.SYS with varying levels of support across DOS versions.
- , SYSBOOT, SYSGEN, SYSLOAD
- Specify system-related parameters including switch characters, alternative boot files, memory addresses, and system loading zones (primarily PTS-DOS specific).
- , SYSTOUMB
- Controls embedded DOS memory pool sizing and options for loading into UMBs.
- , TRACE, TRACEBUF
- Set timeout periods for prompts and enable single-step execution of CONFIG.SYS/AUTOEXEC.BAT with adjustable log buffer sizes (system-dependent).
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and detailed error logging features (OS/2).
UTemplate:NbndZ
- Directs DOS to utilize a particular segment as UMB memory.
- Specifies which UMB server is employed.
- Defines address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Reports a specified DOS version to applications.
- Configures VGA display settings.
- Sets the active video mode.
- Determines whether virtual DMA usage is permitted.
- Enables or disables processor Virtual Mode Extensions.
- Configures VxD drivers for Windows environments.
- Establishes system support parameters for Windows.
- Manages relocation of the Extended BIOS data area.
- Executes conditionally on XT-compatible machines only.
- Enables built-in Year 2000 compliance support.
- Sets the default 'Yes' character used in prompts.
- Controls tracking of file deletions.
Issues
The system can start without CONFIG.SYS present or intact, but both this file and AUTOEXEC.BAT are critical for comprehensive OS customization and software functionality. Repairs may be necessary if either file becomes damaged.
When CONFIG.SYS lacks a SHELL directive—or if it is corrupted or missing—DOS attempts to locate COMMAND.COM in the root directory. Absence of this file causes failure to boot on versions prior to DOS 6.0. Starting with MS-DOS 6.0/PC DOS 6.1, Novell DOS 7+, and later releases, users are prompted to specify a command interpreter path, offering limited shell functionality without requiring a reboot.
COMMAND.COM from MS-DOS 7.0 onward is incompatible with DR-DOS, complicating dual-boot configurations. DR-DOS versions 7.02 and later prevent bypassing SHELL directives during skip/trace/step modes to avoid conflicts. Certain keys restore limited skip functionality for recovery from invalid shell arguments. If no SHELL directive is detected during skipped CONFIG.SYS processing, users must provide a valid shell path before COMMAND.COM loads.
CONFIG.SYS maximum size varies by system: MS-DOS/PC DOS generally permit up to approximately 64 KB in recent versions, whereas DR-DOS imposes no practical limit due to its line-by-line interpretation method. MS-DOS compiles CONFIG.SYS into tokenized form before execution, sorting directives by type—loading device drivers before TSRs—while DR-DOS processes directives sequentially. This allows precise control over loading order using DEVICE and INSTALL, facilitating conflict resolution or integration of debuggers and temporary utilities during boot.
In MS-DOS/PC DOS versions 2.0 through 4.01, SHELL command lines were restricted to 31 characters. Later editions extend this limit up to 128 characters, while DR-DOS supports lines up to 255 characters. CONFIG.SYS directives do not accommodate long filenames.
Dual Booting Between DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This process supports dual boot functionality, allowing users to switch between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to CONFIG.SYS and AUTOEXEC.BAT. The original Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In systems where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unchanged. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.
OS/2 and Windows NT
OS/2 extensively depends on CONFIG.SYS for setting up its environment, loading drivers, and configuring system parameters prior to launching its graphical user interface.
Within the OS/2 subsystem incorporated in Windows NT, the CONFIG.SYS file accessed by OS/2 applications is actually stored within the system registry.
Numerous CONFIG.SYS commands employed by OS/2 are either undocumented or lack comprehensive documentation.
The use of CONFIG.SYS persists in OS/2-based operating systems 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
- Detailed 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
- FreeDOS CONFIG.SYS directive descriptions
- PTS-DOS 2000 Pro User Manual featuring CONFIG.SYS directives (archived)
- Unofficial German FAQ for PTS-DOS including CONFIG.SYS directives (archived)