Jump to content

MAXWAIT (CONFIG.SYS directive)

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

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This distinctive ASCII text file holds setup commands that the operating system's DOS BIOS—usually found in IBMBIO.COM or IO.SYS—interprets during the boot process. CONFIG.SYS made its debut with DOS version 2.0.

Usage

The directives within CONFIG.SYS configure DOS for hardware devices and software, including memory management utilities. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified by the SHELL directive; if none is provided, it defaults to COMMAND.COM. This interpreter then executes the AUTOEXEC.BAT script.

Typically, the file consists of name=value statements that set adjustable parameters or load device drivers and terminate-and-stay-resident (TSR) programs into memory.

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

Several MS-DOS variants utilize alternative filenames:

Later editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 look for CCONFIG.SYS (from "Concurrent") instead of CONFIG.SYS. Certain Multiuser DOS releases employ CCONFIG.INI, while REAL/32 searches for MCONFIG.SYS. These platforms support supplementary configuration data stored in binary files such as CCONFIG.BIN, commonly managed through a utility named CONFIG.EXE.

Within DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and later, a file called DCONFIG.SYS (with "D" denoting DR DOS) takes priority over CONFIG.SYS. Originally introduced alongside disk compression tools to handle drive letter remapping, it now facilitates multi-boot setups.

OpenDOS 7.01 and DR-OpenDOS 7.02 also detect ODCONFIG.SYS, while some DR-DOS 7.02+ versions check for DRCONFIG.SYS. Since DR DOS 6.0, the command SYS /DR:ext enables customization of default file extensions, allowing multiple system files to coexist in a single root directory; these can be selected via boot loaders such as LOADER included with Multiuser DOS and DR-DOS.

The SHELL command allows specifying alternative AUTOEXEC.BAT filenames using /P[:filename.ext], and COMMAND.COM supports non-".BAT" extensions when operating in this mode (a feature also available in 4DOS). DR DOS 6.0 and later versions introduce CHAIN=filespec, which permits continuation of configuration processing from another file that does not need to reside in the root directory; DR-DOS 7.02 and above add optional label arguments to jump to specific sections within chained files.

Starting with DR-DOS 7.03, the SYS /A option copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

FreeDOS provides a comparable functionality through FDCONFIG.SYS, while RxDOS uses RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT are present in the root directory of Windows 95 and Windows 98 boot drives due to their DOS heritage but are generally left empty.

Windows Me does not process CONFIG.SYS at startup; instead, it loads environment variables directly from the Windows Registry at:

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 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>

:;*?!

Defines jump labels within CONFIG.SYS for use with , , , , and commands.
Functions similarly to , but allows inline comments following other commands. (Note that under MS-DOS/PC DOS, inline comments are not ignored if enclosed in double quotes.)
Used at the start of inline comments, along with the ; directive.
Prompts with a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but permits conditional execution via boot menus.) DOS 6.0 and later versions provide a comparable feature using a trailing after commands.
Forces unconditional execution of the next command.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot manager utility.
Adjusts verbosity level of error messages.
Changes the default internal serial device driver assigned to AUX.
Restricts character device availability outside the phantom \DEV directory.
Loads a fundamental device driver into memory.
Produces a brief beep sound even when audible alerts are disabled.
Specifies the operating system to boot subsequently.
Enables or disables extended Ctrl+C interrupt checking.
Defines the quantity of disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area or Upper Memory Blocks.
, ,
Control cache block allocation parameters, retention duration, and flush timing.
Executes programs within CONFIG.SYS, pausing processing until completion.
Sets keyboard Caps Lock state on or off.
,
Defines CD-ROM driver name and buffer quantity.
Continues CONFIG.SYS processing from another file or label.
, , , etc., configure system clock type, clear screen command, and OEM codepages respectively.

... [Further directives continue in a similar manner focusing on key configuration options relevant to business environments] ...

DTemplate:NbndF

Manages relocation of drive descriptor tables in memory.
Specifies segment address for multi-sector disk data deblocking routines.
Enables support for an internal debugger.
Boot manager application.
Loads device drivers into memory space.
Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
Configures country and codepage settings for keyboard, screen, and printer devices.
Sets cache memory sizes for improved performance.
Defines compatibility mode for floppy disk drives.
Selects display font settings.
Controls loading DOS into high memory and utilization of upper memory blocks (similar to in DRDOS 5.0).
Loads DOS system tables such as BUFFERS, FCBS, FILES into upper memory area.
Specifies an alternate directory path for DOS files.
Establishes search paths for data files.
Defines physical disk drive parameters.
Sets parameters for unrecognized disk drives.
See .
Enables error logging to PDUMP.nnn files on specified drives.
Displays messages on screen during processing.
Displays messages including ANSI escape sequences for formatting.
Adds extra validation checks when launching programs.
Defines expected error or return codes from programs.
Controls A20 gate state when starting programs.
Terminates CONFIG.SYS processing early except for certain directives that must follow.
Sets hash table size used for accelerating file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Defines number of cached File Control Blocks (FCBs) allowed simultaneously (shared buffer with FILES in DR-DOS).
Similar to FCBS but loads FCBs into upper memory area instead of conventional memory.
Boot manager component.
Specifies maximum number of files that can be opened concurrently.
Like FILES but loads file handles into upper memory blocks instead of conventional memory.
Includes execution of designated CONFIG.SYS subsections (refer to IGNORE directive).

GTemplate:NbndI

Awaits key press or timeout, assigning error level as ASCII value or 1024 if timed out.
Resumes processing of CONFIG.SYS at the indicated label.
Continues nested CONFIG.SYS execution at specified label, using to return to prior position.
Refer to , , or for details.
Consult for more information.
See for further guidance.
Refer to or as applicable.
See or for related functionality.
Consult for additional context.
Loads a TSR program following DOS data segment relocation, functioning similarly to .
See , , or for more details.
Refer to for further explanation.
Consult or for related commands.
Activates command line and console history buffer with enhanced pattern matching capabilities.
Defines the address of the HMA segment.
Configures energy-saving mode using HLT instruction.
Enables scanning of boot sector viruses.
Loads installable file system drivers.
Prevents execution of designated CONFIG.SYS subsections.
Permits specified applications to operate at CPU ring 2, allowing direct hardware access.
Incorporates directives from an alternate menu block (emulated through GOSUB/RETURN in DR-DOS).
Sets the status of the keyboard Insert mode.
Installs TSR utilities into memory space.
Loads TSR programs into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR program after relocating DOS data segment.
Adjusts PIC interrupt priorities to assign highest priority to a specific IRQ number.

KTemplate:NbndM

Specifies the keyboard layout configuration.
Sets the location of the relocated keyboard buffer in memory.
Defines the maximum number of accessible drives.
Functions like LASTDRIVE but also loads Current Directory Structure into upper memory.
Lists directories for DLL search paths.
Manages compatibility settings for legacy software.
Determines the number of file locks supported.
Configures support for boot logos during startup messages display.
Specifies quantity, sequence, I/O port address, and timeout parameters for LPT1 device.
Applies similar settings for LPT2 device.
Same configuration options for LPT3 device.
Enables and configures LPT4 printer port functionality.
Sets delay before a waiting process receives elevated priority status.
Defines strategy for memory allocation management.
Establishes default DOS memory allocation method.
Specifies available menu choices in CONFIG.SYS menus.
Sets color scheme for menus (can be emulated with ECHO in DR-DOS).
Determines default menu block selection (emulatable via TIMEOUT and SWITCH commands in DR-DOS).
Defines individual menu blocks (can be emulated by ECHO and SWITCH in DR-DOS).
Enables support for multitrack disk operations on drives.
Continues CONFIG.SYS processing from a new file after loading device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines default No () character response in Yes/No/Resume prompts.
Controls keyboard [[Num Lock|Template:Keypress]] toggle state on startup.
Enables conditional execution based on last error code, such as .
Shows a message and waits until a key is pressed by the user.
Requires user confirmation when errors occur in CONFIG.SYS processing.
Configures print buffer size settings for LPT ports output management.
Executes commands conditionally on PC-compatible hardware only.
Sets scheduler priority level for processes or tasks.
Adjusts disk I/O priority assigned to running programs.
Changes default printer device driver among LPT1 through LPT4 ports.
Restricts execution permissions for DOS applications under certain conditions.
Loads user interface shell environment during boot process.
Executes commands conditionally on IBM PS/1-compatible systems only.
Runs commands conditionally on IBM PS/2-compatible machines exclusively.
Suppresses output sent to STDOUT stream.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Inserts explanatory comments within CONFIG.SYS.
Allocates drive letters for local block device drivers.
Defines the default Resume () character displayed in command prompts.
Returns control to the prior CONFIG.SYS processing location after GOSUB or SWITCH commands, optionally passing a return code.
Specifies the size of real mode memory available.
Enables simultaneous loading of programs within CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Saves the initial character of deleted files in the reserved FAT area.
Determines video mode settings (in FreeDOS) or methods for screen access (in PTS-DOS).
Manages the status of the keyboard Scroll Lock key.
Establishes environment variables for system use.
Loads the command interpreter shell program.
Functions like SHELL but allows preloading COMMAND.COM into HMA or UMBs to optimize memory allocation when using third-party shells.
Sets states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines file closure behavior triggered by Ctrl+Alt+Del key sequences.
Bypasses POST during reboot procedures.
, STACKSIZE, STACKSHIGH
Configure interrupt stack sizes and buffer locations across various DOS platforms and versions to optimize memory management.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Specific to PTS-DOS, these directives manage boot settings, system file placement, and memory utilization strategies to enhance operating system startup and performance.
, SWITCH, SWITCHES
Conditional processing commands that facilitate modular scripting within CONFIG.SYS on DOS variants except DR-DOS and FreeDOS.
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific directives that control error logging paths, swap file locations, multithreading concurrency levels, and scheduler time slicing to improve system efficiency and stability.
, TRACE, TRACEBUF
Handle execution timing and logging of CONFIG.SYS operations across DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms to support advanced diagnostics and automation.
Additional directives such as TMPEXT, TRAPDUMP, SXFAKEHWFPU address temporary file extensions management, detailed error logging, and hardware floating-point unit bug corrections within specialized DOS or OS/2 contexts.

UTemplate:NbndZ

Assigns a specific memory segment for use as an Upper Memory Block (UMB) in DOS.
Defines the UMB server configuration.
Indicates address ranges designated for UMB RAM areas.
Toggles disk write verification on or off.
Specifies the DOS version number reported to applications.
Configures VGA display status parameters.
Sets the active video mode.
Enables utilization of virtual DMA channels.
Controls processor Virtual Mode Extensions settings.
Configures VxD driver parameters for Windows environments.
Sets up Windows system support options.
Manages relocation of the Extended BIOS data area.
Executes conditionally on XT-class compatible machines.
Provides Year 2000 compliance configuration.
Defines the default 'Yes' response character used in prompts.
Configures tracking of file deletions.

Issues

While it is possible for the system to boot without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files remain critical for comprehensive operating system customization and application compatibility. Any corruption or damage to these files necessitates troubleshooting procedures.

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. If COMMAND.COM is not found there, earlier DOS versions before 6.0 fail to boot. Conversely, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 or newer will prompt the user to specify a command processor path. This prompt also appears if the primary shell terminates abruptly or exits intentionally, enabling limited replacement of the runtime shell without requiring a full reboot.

The COMMAND.COM from MS-DOS version 7.0 onwards is incompatible with DR-DOS systems but is often located in drive C:'s root partition in dual-boot configurations. From version 7.02 onwards, DR-DOS enforces SHELL directives during skip, trace, or step modes to prevent circumvention of these directives and thereby enhance system stability. Recovery options include reapplying skip behavior to handle invalid shell arguments and prompting for a valid shell filename before loading COMMAND.COM.

CONFIG.SYS file size restrictions differ depending on the operating system—MS-DOS and PC DOS cap CONFIG.SYS at approximately 64 KB in recent releases. In contrast, DR-DOS imposes no practical size limit due to its line-by-line parsing approach. This flexibility allows DR-DOS users precise control over driver and TSR loading sequences, facilitates conflict resolution among components, and supports integration of temporary programs through the INSTALL command.

Earlier MS-DOS editions limited SHELL command lines to a maximum length of 31 characters. Later versions expanded this limit up to 128 characters, while DR-DOS permits up to 255 characters. None of the CONFIG.SYS directives support long filename usage.

Dual Booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows environment, it renames the original CONFIG.SYS and AUTOEXEC.BAT files to CONFIG.DOS and AUTOEXEC.DOS respectively. This change enables a dual-boot setup between Windows 9x and DOS. During a DOS boot, these renamed files are temporarily switched back to their original names, CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of the Windows 95 configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files retain their original filenames. Meanwhile, DR-DOS utilizes 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 up the environment before its graphical user interface initiates. Within the OS/2 subsystem of Windows NT, the equivalent configuration typically found in CONFIG.SYS is instead maintained within the system registry. OS/2 supports a wide range of CONFIG.SYS directives, many of which remain undocumented.

CONFIG.SYS continues to play a vital role in 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) – Partial list of DR-DOS 7 directives
  • Details on FreeDOS CONFIG.SYS directives (archived)
  • PTS-DOS 2000 Pro User Manual with PTS-DOS CONFIG.SYS directives (incomplete)
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) as of April 25, 2004, including additional CONFIG.SYS directives (archived)