AUTOFAIL (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Headquarters | N/A |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file within DOS and OS/2 operating system environments. This plain text ASCII file holds setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during the system startup process. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives contained in CONFIG.SYS tailor DOS behavior for hardware devices, software applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter designated by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
CONFIG.SYS primarily comprises name=value statements that set configurable options or load essential components such as device drivers and terminate-and-stay-resident (TSR) programs. This file is located in the root directory of the bootable drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS versions prioritize alternative configuration filenames over CONFIG.SYS:
- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 adopt CCONFIG.SYS or CCONFIG.INI for configuration, with supplementary settings stored in CCONFIG.BIN which can be edited using CONFIG.EXE.
- In DR DOS 3.31 and later releases, DCONFIG.SYS takes precedence. Initially designed for disk compression configurations, it is also employed for managing multi-boot scenarios.
- OpenDOS versions 7.01 and DR-OpenDOS 7.02 search for ODCONFIG.SYS, whereas some DR-DOS 7.02+ editions check for DRCONFIG.SYS.
- The SYS /DR:ext command available in DR-DOS 6.0 and beyond permits renaming system and configuration files to enable multiple concurrent setups, often coordinated through boot loaders such as LOADER.
- The SHELL directive allows specifying alternate AUTOEXEC.BAT files, with COMMAND.COM accepting extensions other than .BAT in these cases.
- From DR-DOS 6.0 onward, the CHAIN=filespec command facilitates continuing CONFIG.SYS processing by loading another file, optionally jumping to defined labels within it.
- DR-DOS 7.03 and later introduce SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.
Other operating systems use different configuration filenames: FDCONFIG.SYS for FreeDOS, RXCONFIG.SYS for RxDOS, and CONFIG.PTS for PTS-DOS.
Windows 95 and Windows 98, built on DOS foundations, retain CONFIG.SYS and AUTOEXEC.BAT on their boot drives but typically leave them empty. In contrast, Windows Me does not parse CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
Within FlexOS, CONFIG.SYS is a binary file that specifies 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>
:;*?!
- Marks labels within CONFIG.SYS that serve as jump points for , , , and commands.
- Functions similarly to , but is used for inline comments following directives. (MS-DOS/PC DOS handles inline comments differently if enclosed in double quotes.)
- Used to begin inline comments alongside the ; directive.
- Prompts users with a Yes/No question before executing subsequent CONFIG.SYS instructions.[1] (FreeDOS omits customizable messages but supports conditional execution via boot menus.) Starting with DOS 6.0, a comparable feature exists by appending after directives; this is also supported by DR DOS.
- Executes the next CONFIG.SYS directive without any condition.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives update file access timestamps within FAT file systems.
- Enables conditional command execution on AT-compatible computers.
- Functions as a boot manager utility.
- Adjusts the level of detail shown in error messages.
- Changes the default serial driver assigned to the AUX: device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads the fundamental device driver into system memory.
- Produces a brief beep sound even if notification sounds are disabled.
- Defines the operating system to be booted next.
- Activates or deactivates extended Ctrl+C interrupt checking.
- Specifies how many disk buffers should be allocated.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Control timing for cache block allocation and flushing operations.
- Loads programs listed in CONFIG.SYS and pauses further processing until they finish.
- Sets the Caps Lock state on the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Designate CD-ROM driver name and number of buffers.
- Continues processing of CONFIG.SYS by referencing another file or label.
- , CLS, CODEPAGE (various systems)
- Configure system clock type, clear the display screen, and manage OEM codepages.
- , COM2, COM3, COM4 (DR-DOS 7.02+)
- Define count, order, I/O port addresses, and timeout settings for serial COM ports.
- , COMMENT(S) (multiple systems)
- Specify DMA buffer sizes and redefine inline comment characters or ignore specific lines.
- , CPOS, CPSW (various systems)
- Enable internationalization support, set menu cursor position, and allow codepage switching.
- CPU directives (PTS-DOS and DR-DOS)
- Conditional execution based on CPU model (8088, 8086, 286, 386, 486, or newer).
DTemplate:NbndF
- Manages relocation settings for drive descriptor tables.
- Indicates memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger capabilities.
- Functions as a boot manager component.
- Loads a specified device driver into memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country-specific and codepage information for keyboard, screen, and printer devices.
- Sets sizes for cache memory allocation.
- Defines floppy disk compatibility modes.
- Selects display font settings.
- Controls DOS loading into high memory and usage of upper memory blocks.
- Loads DOS system tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for locating data files.
- Specifies physical characteristics of disk drives.
- Sets parameters for drives not recognized by default configurations.
- Refer to for additional details.
- Enables PDUMP.nnn error logging and designates target drive location.
- Displays messages directly on the screen output.
- Shows messages using ANSI escape sequences for formatting.
- Applies extra verification steps when launching programs.
- Defines expected error or return codes from executed programs.
- Sets the A20 gate state during program startup procedures.
- Terminates CONFIG.SYS processing early except for SWITCHES and SHELL commands.
- Adjusts hash table size to optimize file open speed differently from MS-DOS/PC DOS FASTOPEN driver behavior.
- Sets number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but loads FCBs into upper memory areas instead of conventional memory.
- Acts as a boot manager function.
- Specifies maximum number of files that can be opened concurrently by the system.
- Similar to FILES but loads file handles into upper memory blocks for efficiency.
- Allows execution of designated CONFIG.SYS subsections using IGNORE directive.
GTemplate:NbndI
- Waits for a key press 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 at a specified label, then returns to the prior point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related commands.
- Refer to or for context.
- Consult or for more information.
- See .
- Loads a TSR program into memory after relocating the DOS data segment. Compare with INSTCDEX.
- Refer to , , or for related instructions.
- See .
- Refer to or for additional details.
- Activates and sets up console and command line history buffers along with enhanced pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures power-saving mode using HLT instruction.
- Determines if the system scans for boot sector viruses during startup.
- Loads installable file system drivers.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits programs to operate at ring 2, allowing direct hardware interaction.
- Includes directives from another menu block, emulated by GOSUB/RETURN in DR-DOS environments.
- Sets the status of the keyboard Insert mode.
- Installs a TSR program into memory.
- Places a TSR program into upper memory, analogous to HIINSTALL in DR DOS 5.0.
- Installs a TSR following relocation of the DOS data segment, similar to INSTALL command.
- Adjusts PIC interrupt priorities to assign highest precedence to 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 drive letters.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory area.
- Determines search paths for DLL files.
- Manages backward compatibility for legacy software applications.
- Configures the quantity of file locks allowed.
- Controls display of boot logo alongside PTS-DOS boot manager interface.
- Sets parameters such as count, sequence, I/O port address, and timeout value for LPT1 device configuration.
- Establishes similar settings for LPT2 device.
- Configures LPT3 device in like manner.
- Enables and sets parameters for LPT4 device operation.
- Specifies delay before increasing process priority level.
- Adjusts memory allocation methodology used by DOS.
- Defines default strategy for DOS memory allocation routines.
- Specifies options available within system menus.
- Sets menu color schemes, which can be emulated under DR-DOS systems.
- Selects default menu block, with emulation support in DR-DOS environments.
- Defines individual menu blocks, also emulatable under DR-DOS platforms.
- Enables or disables multitrack disk read/write operations.
- Continues processing CONFIG.SYS from another file, optionally after loading a device driver and setting the %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default No () character response in Yes/No/Resume prompts.
- Turns keyboard [[Num Lock|Template:Keypress]] on or off by default at startup.
- Allows conditional command execution based on previous error code values, e.g., .
- Displays text message and waits for user key press, similar to and commands in DR-DOS systems.
- Requires user confirmation before proceeding past errors encountered in CONFIG.SYS processing.
- Configures buffer size used by LPT devices.
- Enables conditional execution on PC-compatible hardware platforms only.
- Adjusts scheduling priority levels within the operating system scheduler.
- Sets priority parameters specifically for disk input/output programs.
- ; Changes default printer driver assignment (for example, switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS programs are permitted to execute under current configuration settings.
- Loads graphical or textual user interface components during startup sequence.
- Conditional execution restricted to IBM PS/1-compatible machines only.
- Conditional execution restricted to IBM PS/2-compatible machines only.
- Suppresses output display sent to STDOUT stream.
RTemplate:NbndT
- Facilitates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates a drive letter for local block device drivers.
- Establishes the default Resume () response character in Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally passing a return code.
- Defines the size of real mode memory available.
- Supports concurrent loading of programs within CONFIG.SYS, analogous to CALL or INSTALL commands in DOS/OS2.
- Saves the initial character of deleted files in the reserved FAT area.
- Determines video mode settings (FreeDOS) or screen access mechanisms (PTS-DOS).
- Configures the Scroll Lock key state, either on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a SIZE parameter for pre-allocating COMMAND.COM within HMA or UMBs to prevent fragmentation.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Controls whether files close upon pressing Ctrl+Alt+Del.
- Bypasses POST during reboot sequences.
- , STACKSIZE, STACKSHIGH
- Define stack sizes for interrupts or threads across various DOS versions, with some compatibility considerations.
- , SYSBOOT, SYSGEN, SYSLOAD
- Directives specific to PTS-DOS handling boot management and system load locations.
- (DOS 6.0+) Specifies submenu blocks but lacks direct support in DR-DOS or FreeDOS.
- , SWAPPATH, THREADS, TIMESLICE
- OS/2-specific directives managing error logging, swap file paths, threading concurrency, and scheduler time slices accordingly.
- , SWITCHES
- Conditional processing commands with SWITCH supported in DR DOS 6.0+ enabling nested CONFIG.SYS execution based on key inputs.
- , TMPEXT
- Defines system switch characters ('/' or '-') and temporary file extensions for PTS-DOS systems.
- , TRACEBUF
- Enables or disables single-step execution tracing of CONFIG.SYS/AUTOEXEC.BAT with configurable log buffer sizes depending on the OS variant.
- , SXFAKEHWFPU
- OS/2 directives addressing error logging and fixes for FPU bugs.
This segment outlines configuration commands utilized across different DOS variants, focusing on customizing system behavior crucial for optimizing operating environments within business contexts.
UTemplate:NbndZ
- Assigns a specific memory segment for use as Upper Memory Blocks (UMB).
- Configures the UMB management service.
- Designates address ranges allocated as UMB RAM.
- Toggles disk write verification on or off.
- Sets the DOS version string reported to applications.
- Manages VGA display status settings.
- Defines the active video mode configuration.
- Enables virtual DMA capabilities.
- Controls processor Virtual Mode Extensions (VME) functionality.
- Configures VxD driver parameters for Windows environments.
- Adjusts Windows system support options.
- Modifies relocation settings for the Extended BIOS Data Area (EBDA).
- Conditional execution directive targeting XT-compatible machines.
- Enables Year 2000 compliance features.
- Specifies the default affirmative response character in prompts.
- Configures tracking of file deletions.
Issues
Although the system can initiate booting without CONFIG.SYS or AUTOEXEC.BAT files, these remain essential for comprehensive operating system customization and meeting software prerequisites. Corruption or absence of either file requires diagnostic intervention.
When CONFIG.SYS omits a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Early DOS releases (prior to version 6.0) fail to proceed if COMMAND.COM is not found. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions prompt users to specify a command processor path. This recovery prompt also appears if the primary shell terminates unexpectedly or is exited intentionally, enabling limited shell substitution during runtime without necessitating a reboot.
The MS-DOS 7.0+ COMMAND.COM is incompatible with DR-DOS and commonly resides on drive C: in dual-boot configurations. DR-DOS versions from 7.02 onward prevent bypassing SHELL directives when running skip/trace/step modes (triggered by Ctrl+F5/F7/F8). Subsequent updates introduced Ctrl+F6 to restore skip functionality, assisting recovery from invalid SHELL arguments. If no SHELL directive is detected during CONFIG.SYS skipping, users are prompted to enter a valid shell filename before COMMAND.COM loads.
CONFIG.SYS file size restrictions vary: MS-DOS/PC DOS limits it to several kilobytes (up to 64 KB in later versions), whereas DR-DOS imposes no fixed limit beyond file system constraints. MS-DOS processes CONFIG.SYS into a tokenized in-memory structure that organizes directives by type—loading device drivers before TSRs—while DR-DOS evaluates each directive sequentially. This line-by-line interpretation allows precise control over loading order using DEVICE and INSTALL commands, aiding conflict resolution, driver debugging, and integration of temporary programs into startup sequences.
In MS-DOS/PC DOS versions from 2.0 through 4.01, the SHELL command line was restricted to a maximum length of 31 characters. Later releases increased this limit up to 128 characters, with DR-DOS accepting up to 255 characters. CONFIG.SYS directives do not support long filename syntax.
Dual booting 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 to enable dual boot functionality. During a DOS boot, these files are temporarily reverted to their initial filenames. The versions used by Windows 95 are saved under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 operates alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files for Windows remain intact, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT for its startup configuration.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, CONFIG.SYS is presented to OS/2 applications in its usual form but is actually maintained within the system registry.
There are numerous undocumented CONFIG.SYS commands available for OS/2, which continues to use this configuration file format in its successors 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
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Details on FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro Manual including CONFIG.SYS directives (archived)
- Unofficial German FAQ for PTS-DOS covering CONFIG.SYS directives (archived)
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG