AUTOCHECK (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration commands for DOS BIOS |
CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, contains configuration commands that the operating system's DOS BIOS—usually located in IBMBIO.COM or IO.SYS—interprets during the boot process. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS are used to set up DOS for hardware devices, software applications, and memory management. Once CONFIG.SYS has been processed, DOS launches the command interpreter specified on the SHELL line; if none is specified, it defaults to COMMAND.COM, which subsequently runs AUTOEXEC.BAT.
Typically, the file consists of name=value pairs that configure adjustable settings or load 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 boot drive.
The same filename is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.
Certain DOS variants check for alternative configuration filenames that can override CONFIG.SYS:
Early versions of Concurrent DOS did not support CONFIG.SYS; however, later releases like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI. In some cases, REAL/32 uses MCONFIG.SYS. These platforms enable extended configuration options stored in binary files such as CCONFIG.BIN, which can be edited through CONFIG.EXE.
From version 3.31 onward, DR DOS and its derivatives (including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, DR-DOS 7.02 and later) prioritize DCONFIG.SYS over CONFIG.SYS. This feature supports multi-boot environments and disk compression setups where drive letters are reassigned after compression drivers load. Additionally, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS 7.02+ editions also look for DRCONFIG.SYS.
Starting with DR DOS 6.0, the command SYS /DR:ext enables renaming system files to allow multiple concurrent configurations within a single root directory. These configurations can be selected using boot managers such as LOADER from Multiuser DOS and DR-DOS. The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT in this context (a feature also supported by 4DOS). The directive CHAIN=filespec permits DR-DOS to continue processing another configuration file and optionally jump to designated labels in DR-DOS 7.02 and later.
In versions 7.03 and above, DR-DOS includes support for SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT along with system files.
FreeDOS provides a comparable mechanism through FDCONFIG.SYS, while RxDOS uses RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
Both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of boot drives under Windows 95 and Windows 98, though they are generally left empty.
Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
In the case of FlexOS, CONFIG.SYS is a binary 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>
:;*?!
- Marks labels within CONFIG.SYS to serve as jump destinations for , , , and commands.
- Functions like , but additionally allows inline comments following other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
- Used at the beginning of inline comments alongside the ; symbol.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support optional messages but handles conditional execution with boot menus.) From DOS 6.0 onwards, a similar effect is achieved by appending after a directive (e.g., ).
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Specifies which drives record file access timestamps within FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Manages boot loading.
- Adjusts the level of detail in error message reporting.
- Changes the default internal serial driver for the AUX device.
- Prevents character devices from being accessible outside the phantom \DEV directory.
- Loads a base device driver into memory.
- Produces a brief beep sound even if notification sounds are disabled.
- Indicates the operating system to be loaded next.
- Enables or disables extended Ctrl+C handling.
- Defines the number of disk buffers to allocate.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , , (Embedded DOS 6-XL only)
- Configure cache block allocation and set cache flush timeouts.
- Executes programs within CONFIG.SYS, pausing processing until they return control.
- Sets the keyboard Caps Lock state.
- , (PTS-DOS only)
- Specifies CD-ROM driver name and buffer count.
- Continues processing CONFIG.SYS from another file or label.
- , , and other PTS-DOS-specific directives manage system clock settings and screen clearing behavior.
- (OS/2 only)
- Defines OEM codepages.
Additional important directives include: - COMx (COM1-COM4): Configure serial port I/O addresses and timeout settings (DR-DOS 7.02+). - COMMENT: Redefines inline comment characters or causes the following line to be ignored, depending on DOS version. - COUNTRY: Enables internationalization features (varies by DOS version). - CPUxxx: Executes conditionally based on CPU type (PTS-DOS and DR-DOS).
This collection of directives allows precise system tuning across various DOS versions, supporting different hardware configurations and enhancing boot-time efficiency for mission-critical environments.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Sets memory segment address for handling multi-sector disk data deblocking.
- Activates internal debugger capabilities.
- Controls boot management functions.
- Loads device drivers into conventional memory.
- 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 sizes for cache memory buffers.
- Defines compatibility mode for floppy disks.
- Specifies font used for display output.
- Manages loading of DOS into high or upper memory areas (similar to in DRDOS 5.0).
- Loads DOS-related tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
- Specifies an alternative search path for DOS files.
- Defines search path for data files.
- Provides physical disk drive parameters configuration.
- Sets parameters for unrecognized or unknown drives.
- Refer to .
- Enables error logging with PDUMP.nnn files on a specified drive.
- Displays a message on screen during boot or processing.
- Shows messages including ANSI escape sequences for formatting.
- Determines whether additional verification occurs when launching programs.
- Assumes an error or return code for subsequent operations when specified.
- Controls A20 gate status at program start-up.
- Terminates CONFIG.SYS processing prematurely (except under certain conditions affecting SWITCHES and SHELL directives).
- Sets hash table size to speed up file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Defines number of cached File Control Blocks (FCBs) that can be opened simultaneously (shares buffer space with FILES under DR-DOS).
- Same as FCBS but loads FCBs into upper memory blocks.
- Boot management functionality.
- Determines maximum number of files that can be open concurrently.
- Same as FILES but loads file handles into upper memory blocks.
- Allows execution of specific CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a key press or timeout, assigning the error level to the ASCII code of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the specified label.
- Continues nested CONFIG.SYS processing at a given label, then returns to the previous point.
- Refer to , , or for additional information.
- See also .
- See also .
- Consult or for details.
- Consult or for details.
- Refer to for further information.
- Loads a TSR program into memory after relocating the DOS data segment; compare with INSTCDEX.
- See , , or for more details.
- Refer to .
- Consult or for guidance.
- Activates console and command line history buffers with extended pattern search capabilities.
- Defines the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode using the HLT instruction.
- Sets system boot sector virus scanning options.
- Loads installable file system drivers.
- Prevents execution of specified CONFIG.SYS subsections.
- Grants certain programs permission to execute at CPU ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu section (emulated via GOSUB/RETURN in DR-DOS).
- Sets the keyboard's Insert mode status.
- Loads a TSR program into memory.
- Loads a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
- Loads TSR after relocating DOS data segment; see INSTCDEX for comparison.
- Adjusts PIC interrupt priorities, assigning highest priority to the specified IRQ.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the location of the relocated keyboard buffer in memory.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
- Defines search paths for DLL files.
- Configures compatibility settings for legacy applications.
- Specifies the number of file locks permitted.
- Enables boot logo support and startup messages when using PTS-DOS boot manager.
- Defines count, logical sequence, I/O address, and timeout parameters for LPT1.
- Same configuration as LPT1 applied to LPT2 device.
- Same configuration as LPT1 applied to LPT3 device.
- Enables and configures LPT4 device functionality.
- Sets delay before increasing process priority level.
- Determines memory allocation policies.
- Specifies default DOS memory allocation strategy.
- Defines options available within menus.
- Sets menu color schemes (can be emulated in DR-DOS).
- Designates default menu block (emulatable in DR-DOS).
- Defines individual menu blocks (emulatable in DR-DOS).
- Enables multitrack disk operation support.
- Continues CONFIG.SYS processing in a new file after loading a device driver, setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default No () character used in Yes/No/Resume prompts.
- Turns keyboard [[Num Lock|Template:Keypress]] on or off.
- Enables conditional execution based on last error code, e.g., .
- Displays a message and waits for a key press, similar to and commands in DR-DOS.
- Requires user confirmation for errors encountered during CONFIG.SYS processing.
- Configures buffer size for LPT port operations.
- Enables conditional execution on PC-compatible systems.
- Sets priority scheduler parameters.
- Assigns priority levels for disk I/O programs.
- Changes default printer driver from LPT1 to LPT3 or LPT4.
- Controls whether DOS applications are permitted to run.
- Loads user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible hardware.
- Enables conditional execution on IBM PS/2-compatible hardware.
- Suppresses output sent to STDOUT stream.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates a drive letter specifically for local block device drivers.
- Sets the default character for Resume () prompts.
- Allows nested CONFIG.SYS processing to return to the prior GOSUB or SWITCH point, optionally with a return code.
- Defines the size of real mode memory.
- Enables simultaneous loading of programs in CONFIG.SYS, similar to the INSTALL command in DOS.
- Determines whether the first character of deleted files is stored in the FAT reserved area.
- Configures video mode under FreeDOS or screen access methods in PTS-DOS.
- Controls the on/off state of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Functions like SHELL but supports pre-allocating space for COMMAND.COM relocation into HMA or UMBs, enhancing memory handling with third-party shells.
- Sets keyboard modifier keys such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close when Ctrl+Alt+Del is pressed.
- Specifies whether POST is skipped during reboot.
- Defines the count of hardware interrupt stacks.
- Similar to STACKS but loads buffers into upper memory areas.
- Configures boot manager settings.
- Defines submenu blocks, which can be emulated using CLS, ECHO, and SWITCH commands in DR-DOS.
- Redirects error logs to a drive instead of displaying popup messages.
- Sets the path for swap files.
- Enables conditional continuation of nested CONFIG.SYS processing at designated labels based on key input, with RETURN to previous location.
- Specifies the default switch character ('/' or '-').
- Defines special options for configuration.
- Specifies an alternative DOS boot filename.
- Manages memory locations for DOS components.
- Loads the system from an alternate disk sector.
- Determines the size of dynamic system memory pool allocation.
- Loads DOS data and code into upper memory blocks (UMBs).
- Sets the number of concurrent threads allowed.
- Configures timeouts for CONFIG.SYS single-stepping and default responses for queries and SWITCH commands. PTS-DOS supports only timeout values.
- Sets minimum and maximum values for scheduler time slices.
- Defines file extensions used for temporary files.
- Enables or disables global or local single-stepping for CONFIG.SYS (and AUTOEXEC.BAT). Behavior varies significantly between OS/2 and DOS variants.
- Specifies TRACE log buffer size.
- Records detailed error information during system traps.
UTemplate:NbndZ
- Assigns a specific segment of memory as UMB (Upper Memory Block) for DOS use.
- Configures settings for the UMB server.
- Defines address ranges allocated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to software applications.
- Adjusts VGA display status parameters.
- Specifies current video mode settings.
- Enables use of virtual DMA (Direct Memory Access).
- Disables processor Virtual Mode Extensions (VME).
- Configures VxD drivers for Windows environments.
- Sets up system support parameters for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Allows conditional execution on XT-compatible machines.
- Configures built-in support for Year 2000 compliance.
- Defines default affirmative response character in prompts.
- Manages deletion tracking functionality.
Challenges
Although the operating system can initiate without CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for comprehensive OS customization and meeting software prerequisites. Any corruption or damage to these files requires diagnostic efforts.
In the absence or corruption of a SHELL command in CONFIG.SYS, DOS defaults to locating COMMAND.COM in the root directory of the boot drive. Versions preceding DOS 6.0 will fail to boot if COMMAND.COM is not found. From MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 onward, users are prompted to enter the path to the command interpreter when COMMAND.COM is missing or terminated unexpectedly, allowing a limited shell replacement without rebooting.
COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which complicates dual-boot configurations where COMMAND.COM is stored on the C: drive. DR-DOS versions 7.02 and above limit skipping SHELL commands during skip/trace/step debugging modes but later introduced features that prompt users for a valid shell filename if an invalid SHELL argument is encountered before loading COMMAND.COM.
The maximum size allowed for CONFIG.SYS varies: MS-DOS and PC DOS impose a cap of 64 KB in recent editions, whereas DR-DOS does not enforce any size restriction beyond file system limitations. This difference stems from their processing approaches—MS-DOS compiles CONFIG.SYS into a tokenized format before loading device drivers and TSR programs, while DR-DOS parses the file line-by-line, providing more granular control over load order and conditional execution based on CPU type, key states, error conditions, or return codes. Additionally, DR-DOS’s INSTALL directive permits embedding non-resident software within the CONFIG.SYS process, enhancing configurability.
Limits on the length of the SHELL command line range from 31 characters in MS-DOS/PC DOS versions 2.0 through 4.01 up to 128 characters in later releases; DR-DOS supports lines as long as 255 characters. Notably, CONFIG.SYS does not accommodate long filenames.
Dual Booting DOS with 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 to enable dual booting between Windows 9x and DOS. During booting into DOS mode, these files are temporarily reverted to their original names (CONFIG.SYS and AUTOEXEC.BAT). Meanwhile, backups of the Windows 95 versions are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, Windows’ CONFIG.SYS and AUTOEXEC.BAT remain untouched; instead, DR-DOS uses alternative startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 and Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring system parameters, loading device drivers, and setting up the environment prior to launching its graphical user interface.
Within the OS/2 subsystem integrated into Windows NT, what OS/2 applications perceive as CONFIG.SYS is actually maintained within the Windows registry.
Several CONFIG.SYS directives in OS/2 remain undocumented or insufficiently documented.
CONFIG.SYS continues to be utilized by OS/2 derivatives including 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 available at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 CONFIG.SYS commands
- Description of CONFIG.SYS directives for FreeDOS
- User Manual for PTS-DOS 2000 Pro featuring CONFIG.SYS directives overview
- German-language unofficial PTS-DOS FAQ (PTS/FAQD) containing additional CONFIG.SYS commands
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG