Jump to content

PAUSEONERROR (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article PAUSEONERROR (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryOperating systems
Founded1983
ProductsSystem initialization and configuration for DOS and OS/2

CONFIG.SYS serves as the central configuration file for DOS and OS/2 operating systems. This ASCII text file contains initialization commands that the operating system's DOS BIOS interprets during startup. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS set up DOS to support hardware devices and software, including memory management utilities. Once CONFIG.SYS is processed, DOS launches the command interpreter specified by the SHELL directive, defaulting to COMMAND.COM if none is indicated. This shell then executes the AUTOEXEC.BAT script.

CONFIG.SYS primarily includes name=value statements that adjust configurable parameters or load essential components such as device drivers and terminate-and-stay-resident (TSR) programs.

In DOS systems, CONFIG.SYS 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 VEB Robotron.

Certain DOS versions check for alternate configuration filenames that override CONFIG.SYS:

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI instead, with settings stored in a binary file called CCONFIG.BIN. These platforms provide additional configuration options beyond those available in MS-DOS/PC DOS and use CONFIG.EXE to modify settings.

- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS takes priority over CONFIG.SYS. This arrangement supports cases such as disk compression where drive letters change after loading compression drivers, enabling flexible multi-boot setups.

- OpenDOS 7.01 and DR-OpenDOS 7.02 look for a file named ODCONFIG.SYS, while some DR-DOS 7.02+ releases recognize DRCONFIG.SYS.

Starting with DR-DOS 6.0, the SYS /DR:ext command allows customization of system file extensions, facilitating multiple distinct file sets within a single root directory selectable by boot loaders like LOADER from Multiuser DOS and DR-DOS 7.x. The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT (a feature also supported by 4DOS). Additionally, the CHAIN=filespec directive enables continuation of configuration processing in other files, optionally jumping to specific labels since DR-DOS 7.02.

Versions of DR-DOS from 7.03 onward include a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files during setup.

FreeDOS utilizes FDCONFIG.SYS, RxDOS 7.24+ uses RXCONFIG.SYS, and PTS-DOS relies on CONFIG.PTS.

In the case of Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT are present on boot volumes but generally remain empty. Meanwhile, Windows Me does not process CONFIG.SYS at startup, instead loading environment variables directly from the Windows Registry.

For FlexOS, CONFIG.SYS differs as it is a binary file responsible for defining resource managers and device drivers.

Example

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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump points for , , , and commands.
Functions similarly to , but is designed for inline comments placed after other CONFIG.SYS directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Used to initiate inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution via boot menus.) DOS version 6.0 and later offers a comparable feature by appending after directives.
Executes the following CONFIG.SYS directive without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives track file access timestamps in FAT systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the level of detail shown in error messages.
Modifies the default serial driver assigned to 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 even if audible alerts are disabled.
Specifies the operating system that should boot next.
Enables or disables extended Ctrl+C detection.
Defines how many disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
Sets the maximum number of dynamically allocated cache blocks.
Defines the maximum duration before unused cache blocks are returned to the system pool.
Specifies the maximum time before dirty cache blocks are flushed to disk.
Runs programs within CONFIG.SYS, halting further processing until they return.
Sets Caps Lock status on keyboard as enabled or disabled.
Names the CD-ROM hardware driver in use.
Determines the number of buffers allocated for CD-ROM access.
Continues processing of CONFIG.SYS from another file, optionally starting at a specified label.
Indicates the type of system clock installed.
Clears the screen display.
Defines one or more OEM codepages.
Specifies an address within CMOS RAM.
Sets color schemes for boot menus.
, ;COM2, ;COM3, ;COM4
Configure count, logical sequence, I/O port address, and timeout values for COM ports (available in DR-DOS 7.02 and later).
Specifies DMA buffer settings (PTS-DOS).
, ;COMMENTS
Alters characters used for inline comments or causes line skipping depending on operating system behavior.
, ;CPOS, ;CPSW
Manage internationalization support, cursor placement in configuration menus, and codepage switching (varies by OS).
CPU-related directives (CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+) enable conditional execution based on specific CPU models (PTS-DOS and DR-DOS).

DTemplate:NbndF

Controls relocation of drive descriptor tables in memory.
Sets memory segment address for multi-sector data deblocking on disks.
Activates internal debugger functionality.
Boot management utility.
Loads a device driver into conventional memory.
Loads a device driver into upper memory area (equivalent to in DR-DOS 5.0).
Configures country and codepage settings for keyboard, screen, and printer devices.
Adjusts sizes of cache memory allocations.
Defines floppy disk compatibility mode settings.
Specifies display font parameters.
Determines whether DOS loads into high memory area and/or uses upper memory blocks (similar to in DR-DOS 5.0).
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory segments.
Defines an alternative directory path for DOS files.
Specifies search paths for data files used by DOS utilities.
Sets physical characteristics of disk drives for proper operation.
Establishes parameters for unrecognized or generic drives.
Refer to for additional details.
Enables drive-specific logging for PDUMP.nnn error reports.
Displays a simple message on screen during startup or processing.
Shows messages incorporating ANSI escape sequences for enhanced formatting.
Adds extra validation checks when launching programs.
Assigns an expected error or return code value to subsequent commands executed by DOS.
Controls the state of the A20 gate when programs start running.
Terminates CONFIG.SYS processing prematurely except in cases involving SWITCHES and SHELL directives under certain conditions).
Configures hash table size used to speed up file opening operations, differing from MS-DOS/PC DOS FASTOPEN implementation.
Sets how many File Control Blocks can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads these structures into upper memory area.
Boot management utility component.
Defines maximum number of files that can be open at once during operation.
Same as FILES but explicitly loads file handles into upper memory segments.
Includes execution of specific subsections within CONFIG.SYS (refer to IGNORE directive).

GTemplate:NbndI

Awaits a keypress or timeout, then assigns the error level to the key's ASCII value 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 previous position.
Refer to , , or for more details.
Consult for additional information.
See for further reference.
Refer to or as applicable.
See or for related commands.
Consult for more details.
Loads a TSR utility into memory similarly to , but after relocating the DOS data segment.
See , , or for related options.
Refer to for additional context.
See or as relevant.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the segment address for the High Memory Area (HMA).
Sets parameters for HLT-based power saving features.
Determines whether to perform a virus check on the system boot sector.
Loads installable file system drivers.
Prevents execution of specific CONFIG.SYS subsections.
Grants certain programs permission to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from an alternate menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the status of the keyboard Insert mode.
Installs a TSR program into memory space.
Loads TSR software into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR programs after relocating the DOS data segment.
Adjusts PIC controller interrupt priorities, assigning highest priority to a specified interrupt number.

KTemplate:NbndM

Defines which keyboard layout to use.
Sets the relocated keyboard buffer’s memory address.
Specifies the maximum number of accessible drives allowed.
Functions like LASTDRIVE but additionally loads the Current Directory Structure into upper memory.
Lists directories to search when loading DLLs.
Manages backward compatibility for legacy applications.
Configures how many file locks can be active simultaneously.
Sets parameters for boot logo display and startup messages.
Determines count, order, I/O port address, and timeout values for LPT1 devices.
Defines similar parameters for LPT2 devices including count, order, I/O address, and timeout.
Specifies count, order, I/O port, and timeout settings for LPT3 devices.
Enables and configures LPT4 device support with comparable settings.
Sets delay duration before elevating process priority during wait states.
Controls memory allocation policies and strategies.
Specifies default method used by DOS for allocating memory resources.
Defines available menu options within the configuration interface.
Sets color schemes for menus, which can be emulated in DR-DOS environments.
Designates default menu blocks, with emulation support in DR-DOS systems.
Defines multiple menu blocks, emulatable in DR-DOS configurations.
Enables operations involving multitrack disk drives.
Continues CONFIG.SYS processing from a new file after loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default character representing "No" in Yes/No/Resume prompts (default is ).
Configures whether the keyboard’s [[Num Lock|Template:Keypress]] is enabled or disabled on startup.
Executes commands conditionally based on the last error code encountered (e.g., ).
Displays a message and waits for a key press, functioning similarly to and commands in DR-DOS systems.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Adjusts buffer sizes allocated to LPT1 through LPT3 ports.
Executes commands conditionally on PC-compatible hardware platforms only.
Configures scheduler priority levels for processes and tasks.
Sets priority levels specifically for disk I/O-related programs or drivers.
Changes which printer device driver is assigned as default among LPT1 through LPT4 ports.
Determines whether DOS applications are permitted to run on the system.
Loads and initializes user interface components or shells.
Executes commands conditionally on IBM PS/1-compatible machines only.
Executes commands conditionally on IBM PS/2-compatible machines only.
Suppresses output sent to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates a drive letter specifically for local block device drivers.
Sets the default Resume () response character in Yes/No/Resume prompts.
Returns control from nested CONFIG.SYS processing to the preceding GOSUB or SWITCH command, optionally providing a return code.
Defines the size of real mode memory available.
Enables parallel loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands under DOS.
Determines whether the first character of deleted files is preserved in the FAT reserved area.
Configures video mode settings for FreeDOS or screen access methods for PTS-DOS.
Controls the on/off state of the keyboard Scroll Lock key.
Assigns environment variables.
Loads the command interpreter shell.
Similar to SHELL but includes a size parameter allowing relocation of COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
Specifies states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files are closed automatically when Ctrl+Alt+Del is pressed.
Skips Power-On Self Test (POST) during system reboot.
Defines the number of hardware interrupt stacks.
Sets default stack size for newly created threads.
Functions like STACKS but loads buffers into upper memory areas.
Configures boot manager settings.
Defines submenu blocks, which can be emulated under DR-DOS environments.
Redirects error logs to a drive instead of displaying pop-up messages.
Specifies the path location for swap files.
Allows conditional continuation of nested CONFIG.SYS processing at designated labels based on key presses, with RETURN bringing control back to the previous point.
Sets the default system switch character, either '/' or '-'.
Specifies special configuration options.
Enables a fix for floating-point unit (FPU) rounding errors.
Indicates an alternative DOS system file to use during booting.
Configures memory locations for DOS components.
Loads system files from an alternative disk area.
Defines the size of the dynamic memory pool used by the system.
Loads DOS data and code segments into Upper Memory Blocks (UMBs).
Sets the maximum number of concurrent threads allowed in the system.
Configures timeout durations in CONFIG.SYS single-step execution and default responses for Yes/No prompts and SWITCH commands (PTS-DOS supports timeout settings only).
Adjusts scheduler time slice minimum and maximum lengths.
Specifies temporary file extensions used by the system.
Enables or disables single-step execution of CONFIG.SYS and AUTOEXEC.BAT globally or locally (behavior varies between OS/2 and DOS).
Defines the size of TRACE log buffers.
Records detailed error information when traps or faults occur.

UTemplate:NbndZ

Sets up DOS management to utilize a specific memory segment as Upper Memory Block (UMB) space.
Determines which UMB server is employed by the system.
Defines address ranges designated as UMB RAM areas.
Enables or disables verification of disk writes for data integrity.
Specifies the DOS version number reported to software applications.
Manages VGA display status configurations.
Indicates current video mode settings in use.
Controls whether virtual DMA functionality is permitted.
Determines if processor Virtual Mode Extensions should be deactivated for compatibility reasons.
Configures Virtual Device Driver (VxD) settings for Windows environments.
Sets up system support parameters specific to Windows operation.
Manages relocation settings for the Extended BIOS Data Area (XBDA).
Enables conditional execution tailored for XT-compatible machines.
Configures built-in support addressing Year 2000 compliance issues.
Defines the default character used as 'Yes' in prompt dialogues.
Manages tracking options related to file deletion activities.

Issues

While the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive customization and ensuring software compatibility. If either file becomes damaged or corrupted, troubleshooting is necessary.

In the absence of a SHELL directive within CONFIG.SYS, or if the file is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not initiate without this file. Starting with MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later, users are prompted to specify a command processor path if COMMAND.COM is absent or terminated unexpectedly, enabling a limited shell replacement without rebooting.

COMMAND.COM from MS-DOS 7.0 onward is not compatible with DR-DOS, which can create issues in dual-boot environments. DR-DOS versions 7.02 and above enforce the presence of SHELL directives during skip, trace, or step modes by requesting valid shell filenames if missing before loading COMMAND.COM from the root directory.

The maximum size of CONFIG.SYS differs between systems: MS-DOS and PC DOS impose limits typically ranging from a few kilobytes up to 64 KB in newer editions. In contrast, DR-DOS does not enforce a practical size restriction because it processes the file line-by-line rather than tokenizing it. This approach grants DR-DOS users enhanced flexibility in managing the load sequence of drivers and TSR programs through DEVICE and INSTALL commands, allowing resolution of conflicts and conditional execution based on hardware detection or error conditions.

In MS-DOS and PC DOS versions 2.0 through 4.01, the SHELL directive was confined to 31 characters; this limit expanded to 128 characters in subsequent releases. DR-DOS supports up to 255 characters for this directive. It is important to note that none of the CONFIG.SYS commands accept long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively, simplifying dual-boot operation between Windows 9x and DOS. During a DOS boot session, these files are temporarily restored to their original names CONFIG.SYS and AUTOEXEC.BAT. 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, Windows retains its CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS uses alternative startup files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 / Windows NT

OS/2 relies heavily on CONFIG.SYS for loading drivers and setting environment variables prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, what appears as CONFIG.SYS to OS/2 applications is actually maintained within the system registry.

Numerous CONFIG.SYS directives used in OS/2 remain undocumented or only partially documented.

CONFIG.SYS continues to be employed by OS/2 derivatives such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details at Computer Hope
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
  • Caldera's CONFIG.SYS Command Reference (archived; DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS directive documentation (archived)
  • PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands (archived)
  • Unofficial German PTS-DOS FAQ featuring CONFIG.SYS directives (archived)