INSTALLLAST (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration directives for DOS and OS/2 |
CONFIG.SYS serves as the chief configuration file within the DOS and OS/2 operating system families. This plain text file contains setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during system startup. The CONFIG.SYS file was first introduced with DOS version 2.0.
Usage
The directives contained in CONFIG.SYS are responsible for configuring DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL statement; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.
Typically, CONFIG.SYS is composed of name=value pairs that define settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs) into memory. This file is located in the boot drive’s root directory.
Certain DOS distributions check for alternative configuration filenames that override CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI, with supplementary settings stored in CCONFIG.BIN. These files are edited using CONFIG.EXE.
- In DR DOS starting from version 3.31 and later releases such as Novell DOS 7 and DR-DOS 7.02+, DCONFIG.SYS takes precedence to facilitate disk compression and multi-boot configurations by allowing multiple configuration files.
- Versions like OpenDOS 7.01 and DR-OpenDOS 7.02 also recognize ODCONFIG.SYS, while some DR-DOS editions utilize DRCONFIG.SYS.
From DR DOS 6.0 onward, it is possible to alter default file extensions via SYS /DR:ext, enabling several sets of system files to coexist within a single root directory. Boot loaders such as LOADER (used by Multiuser DOS and DR-DOS) can select among these sets. The SHELL directive supports specifying alternate AUTOEXEC.BAT files using the /P[:filename.ext] parameter, with COMMAND.COM accepting extensions other than .BAT—a capability also provided by 4DOS.
The CHAIN=filespec command in DR-DOS allows continuation of processing from another configuration file, which may be located outside the boot drive’s root directory; recent versions permit jumping directly to labeled sections within that file. Additionally, DR-DOS 7.03+ introduces a SYS /A option to copy CONFIG.SYS and AUTOEXEC.BAT alongside system files during setup.
Other DOS variants offer comparable functionality: for example, FreeDOS uses FDCONFIG.SYS, RxDOS relies on RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
In the context of Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot device but are generally left empty. Conversely, Windows Me does not process CONFIG.SYS during startup; instead, environment variables are loaded from the Windows Registry.
For systems running FlexOS, CONFIG.SYS is a binary-format file that specifies resource managers and device drivers to be loaded during initialization.
Example
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 in CONFIG.SYS to serve as jump destinations for , , , , and commands.
- Functions like , but allows inline comments following other directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
- Initiates inline comments, used together with the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional processing with boot menus via and .) From DOS 6.0 onward, a similar effect is achieved by appending to directives (e.g., ).
- Forces the immediate execution of the next CONFIG.SYS directive.
ATemplate:NbndC
- Determines whether programs can be terminated upon encountering errors.
- Sets which drives record file access timestamps within FAT file systems.
- Enables conditional execution specifically on AT-compatible hardware.
- Provides boot management capabilities.
- Adjusts the level of detail shown in error messages.
- Alters the default serial device driver assigned to the AUX: device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads fundamental device drivers into memory.
- Triggers an audible beep even if sound notifications are disabled.
- Specifies which operating system to load next during boot.
- Enables or disables extended Ctrl+C interrupt handling.
- Defines how many disk buffers are allocated.
- Similar to BUFFERS, but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage allocation of dynamic cache blocks and control flushing timing.
- Executes programs within CONFIG.SYS, pausing further processing until they return control.
- (DR-DOS 7.02+)
- Sets the Caps Lock state of the keyboard.
- , CDDBUFFERS (PTS-DOS only)
- Configures CD-ROM driver parameters and buffer sizes.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing CONFIG.SYS from a new file or label.
- , CLS, CODEPAGE (PTS-DOS or OS/2 specific)
- Manage system clock types, clear screen commands, or OEM codepage settings.
- (DR-DOS 7.02+)
- Defines COM port quantity, sequence, I/O addresses, and timeouts.
- , COMMENT(S), COUNTRY, CPOS, CPSW (various DOS versions)
- Handle DMA buffers, inline comments, internationalization support, cursor positioning, and codepage switching.
- CPU directives (PTS-DOS only)
- Execute conditionally based on CPU model and clock speed variants such as CPU88, CPU86, CPU286, CPU386, and CPU486.
DTemplate:NbndF
- Configures relocation parameters for drive descriptor tables.
- Sets memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger support functionality.
- Offers boot management features.
- Loads specified device drivers into memory.
- Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Adjusts sizes of cache memory allocations.
- Defines compatibility mode for floppy disk drives.
- Specifies display font settings.
- Controls loading of DOS into high memory and usage of upper memory blocks.
- Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Specifies an alternative directory path for DOS system files.
- Defines search paths for data files used by DOS utilities.
- Sets physical characteristics of disk drives for proper operation.
- Establishes parameters for unrecognized or unknown drives.
- Refer to .
- Enables PDUMP.nnn error logging and specifies target drive for logs.
- Outputs a message directly to the screen display.
- Displays messages that include ANSI escape sequences for formatting.
- Determines whether additional verification occurs when launching programs.
- Defines a specific error or return code to be assumed afterward.
- Controls the A20 gate state during program startup sequences.
- Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL directives under specific conditions.
- Sets size of hash tables used for accelerated file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
- Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
- Same as FCBS but explicitly loads FCBs into upper memory area.
- Boot management utility directive.
- Defines maximum number of files that can be opened concurrently.
- Similar to FILES but explicitly allocates file handles in upper memory blocks.
- Includes execution of designated CONFIG.SYS subsections (see IGNORE).
GTemplate:NbndI
- Waits for a key press or until timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at the indicated label.
- Continues nested CONFIG.SYS processing at a specified label, then returns to the prior position.
- Refer to , , or for additional details.
- Consult for further information.
- See for more context.
- See or for related commands.
- Refer to or for more details.
- See for further reference.
- Loads a TSR program into memory following relocation of the DOS data segment; compare with INSTCDEX.
- Refer to , , or for related options.
- See for additional context.
- See or for further details.
- Activates console and command line history buffer along with enhanced pattern searching capabilities.
- Specifies the address of the High Memory Area (HMA) segment.
- Configures energy-saving mode via HLT instruction.
- Enables scanning of the boot sector for viruses.
- Loads installable file system drivers.
- Prevents execution of designated CONFIG.SYS subsections.
- Permits certain programs to execute at CPU ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated by GOSUB/RETURN in DR-DOS).
- Sets the status of keyboard Insert mode.
- Loads a TSR program into memory.
- Installs TSR into upper memory area (similar to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating DOS data segment; see also INSTCDEX.
- Adjusts PIC interrupt priorities to assign highest priority to a specified IRQ line.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Sets relocated address for the keyboard buffer.
- Determines maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Specifies search paths for DLL files.
- Manages compatibility handling for legacy applications.
- Sets the quantity of file locks permitted.
- Configures boot logo and startup message using PTS-DOS boot manager.
- Defines count, order, I/O port address, and timeout parameters for LPT1 device.
- Applies same settings as LPT1 to LPT2 device.
- Applies same settings as LPT1 to LPT3 device.
- Enables and configures LPT4 device similarly to other LPT ports.
- Sets delay before increasing process priority level.
- Configures strategy for memory allocation management.
- Specifies default DOS memory allocation approach.
- Defines available menu options.
- Sets color scheme for menus (can be emulated via ECHO command in DR-DOS).
- Establishes default menu block (emulatable using TIMEOUT and SWITCH commands in DR-DOS).
- Defines individual menu blocks (emulatable via ECHO and SWITCH in DR-DOS).
- Enables multitrack disk operation support.
- Continues processing CONFIG.SYS from a new file after loading a specific driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default "No" character used in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] state, turning it on or off.
- Executes commands conditionally based on last error code, e.g., .
- Displays text and waits for user key press, similar to and commands in DR-DOS.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer size parameters for LPT ports.
- Executes commands conditionally on PC-compatible hardware platforms.
- Adjusts scheduler priority levels.
- Sets priority levels for disk I/O operations.
- Changes default printer driver device (from LPT1 to LPT3 or LPT4).
- Determines whether DOS applications are allowed to run.
- Loads user interface components.
- Executes commands conditionally on IBM PS/1-compatible systems.
- Executes commands conditionally on IBM PS/2-compatible systems.
- Suppresses output sent to STDOUT display.
RTemplate:NbndT
- Activates automatic reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS.
- Allocates a drive letter for local block device drivers.
- Sets the default character for Resume () queries.
- Returns nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally with a return code.
- Defines the size of real mode memory.
- Executes programs in CONFIG.SYS simultaneously in the background.
- Saves the first character of deleted files in the reserved FAT area.
- Determines video mode under FreeDOS or screen access methods under PTS-DOS.
- Toggles Scroll Lock keyboard status on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports preloading COMMAND.COM into HMA or UMBs to minimize fragmentation, beneficial when using third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Defines whether files close upon pressing Ctrl+Alt+Del.
- Skips POST during system reboot.
- , STACKSIZE, STACKSHIGH
- Various configurations for stack size across DOS variants addressing hardware interrupts and memory allocation, with some parameters ignored or superseded in newer releases.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
- Commands specific to PTS-DOS managing boot manager options, alternative OS boot files, DOS memory locations, and loading DOS data/code into UMBs.
- , SUPPRESSPOPUPS, SWAPPATH
- OS/2 features controlling submenu blocks, error logging drives, and swap file path settings.
- , SWITCHES, SWITCHAR
- Controls for conditional CONFIG.SYS processing, system options, and default command switch characters across different DOS versions.
- , THREADS
- OS/2 parameters addressing FPU bug fixes and configuring concurrent thread counts.
- , TIMESLICE
- Sets timeouts for CONFIG.SYS operations and scheduler time slices in both DOS and OS/2 environments.
- , TRACE, TRACEBUF
- Settings for temporary file extensions and enabling/disabling single-stepping through CONFIG.SYS/AUTOEXEC.BAT with adjustable log buffer sizes (applicable to DOS variants and OS/2).
- , STORAGE
- Details on OS/2 error logging and PTS-DOS boot management capabilities.
UTemplate:NbndZ
- Assigns a specific memory segment for use as UMB memory in DOS.
- Configures the UMB server settings.
- Defines address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Controls VGA display status parameters.
- Specifies the active video mode.
- Activates virtual DMA capabilities.
- Manages processor Virtual Mode Extensions settings.
- Configures VxD drivers for Windows environments.
- Establishes system support parameters for Windows.
- Adjusts relocation settings for the Extended BIOS data area.
- Enables conditional execution on XT-compatible hardware.
- Configures built-in Year 2000 compliance features.
- Sets the default character used for Yes responses in prompts.
- Manages deletion tracking functionality.
Issues
Although the system can operate without CONFIG.SYS, this file alongside AUTOEXEC.BAT is critical for tailoring DOS behavior and loading necessary software components. Corruption or damage to these files requires diagnostic efforts.
In cases where CONFIG.SYS lacks a SHELL directive or is missing or corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM is not found. MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions prompt users for a command processor path if COMMAND.COM is missing or if the shell terminates unexpectedly. This recovery prompt also facilitates limited runtime replacement of the shell without necessitating a reboot.
Due to incompatibilities between MS-DOS versions 7.0 and above’s COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later restrict skipping SHELL directives during skip/trace modes. They require valid shell input before loading COMMAND.COM from the root directory during recovery procedures.
CONFIG.SYS size limitations vary among systems: MS-DOS/PC DOS historically restricted file size to several kilobytes (recently extended up to around 64 KB), whereas DR-DOS imposes no practical size constraints beyond those dictated by the file system itself. MS-DOS compiles CONFIG.SYS into a tokenized structure in memory before processing directives sequentially. In contrast, DR-DOS interprets each directive line-by-line during execution, allowing greater flexibility in load order and enabling conditional logic based on hardware detection, key presses, error codes, or software return values.
This flexibility permits DR-DOS users to incorporate temporary external utilities within CONFIG.SYS using INSTALL, supporting advanced customization options and facilitating debugging processes.
Limits on SHELL command line lengths differ by version: MS-DOS/PC DOS versions 2.0 through 4.01 allow up to 31 characters; subsequent releases permit up to 128 characters, while DR-DOS supports up to 255 characters. CONFIG.SYS directives do not accept long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over a pre-existing DOS or Windows environment, the system automatically renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual-boot setup between Windows 9x and DOS. During a DOS boot, these renamed files temporarily assume their original filenames. Additionally, Windows 95-specific versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In configurations where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT to manage its startup processes.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for configuring the system, loading drivers, and setting environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, the role of CONFIG.SYS is handled through registry settings rather than conventional configuration files.
A significant number of CONFIG.SYS commands in OS/2 lack comprehensive documentation or are only partially documented.
CONFIG.SYS continues to serve a critical function 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
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
- Caldera’s CONFIG.SYS Command Reference – DR-DOS 7 directive summary (archived)
- FreeDOS CONFIG.SYS directive documentation
- PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ including details on CONFIG.SYS directives (archived)