Jump to content

INSTALL (CONFIG.SYS directive)

From Alfawiki
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
Headquarters
—
ProductsOperating system configuration

CONFIG.SYS serves as the main configuration file for the DOS and OS/2 operating system families. This plain text file, written in ASCII, contains setup instructions accessible to users, which are interpreted by the operating system's DOS BIOS—commonly located in IBMBIO.COM or IO.SYS—during the system boot process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to configure DOS for hardware devices and software applications, including memory management utilities. Once CONFIG.SYS has been processed, DOS proceeds to load the command interpreter specified on the SHELL line; if none is defined, it defaults to COMMAND.COM, which then executes commands from AUTOEXEC.BAT.

Typically, the file contains name=value pairs that set configurable parameters or load files, primarily device drivers and terminate-and-stay-resident programs (TSRs), into memory.

In DOS environments, CONFIG.SYS is located in the root directory of the boot partition.

The same filename is also employed by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.

Certain DOS variants recognize alternative filenames that override CONFIG.SYS:

Earlier versions of Concurrent DOS did not utilize CONFIG.SYS; however, subsequent editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 look for CCONFIG.SYS (derived from "Concurrent"). Some Multiuser DOS releases use CCONFIG.INI, while REAL/32 uses MCONFIG.SYS. These platforms maintain additional configuration data in binary files like CCONFIG.BIN, which are typically edited using a utility named CONFIG.EXE.

From version 3.31 onward, DR DOS (including PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02+) prioritizes DCONFIG.SYS (short for "DR DOS") over CONFIG.SYS. This preference facilitates setups involving disk compression software and supports multi-boot scenarios. OpenDOS 7.01 and DR-OpenDOS 7.02 also check for ODCONFIG.SYS, whereas some DR-DOS 7.02+ versions look for DRCONFIG.SYS.

Starting with DR DOS 6.0, the SYS /DR:ext command allows modification of default system file extensions to enable multiple concurrent system file sets within a single root directory, selectable through boot loaders such as LOADER (used in Multiuser DOS and DR-DOS). The SHELL directive can specify alternate AUTOEXEC.BAT files using /P[:filename.ext], and COMMAND.COM accepts extensions other than ".BAT" for this purpose.

Beginning with DR-DOS 6.0, the CHAIN=filespec command enables continuation of configuration processing from an additional file that may reside outside the root directory; later versions (DR-DOS 7.02+) extend this functionality with CHAIN=filespec,label, allowing jumps to specific labels within those files.

With DR-DOS 7.03 and later releases, the SYS /A command copies both CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS adopts a similar approach using FDCONFIG.SYS; meanwhile, RxDOS version 7.24+ uses RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of Windows 95/98 boot drives but are generally left empty.

Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables directly from the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.

In contrast, under FlexOS, CONFIG.SYS is a binary file that defines resource managers and device drivers loaded at boot time.

Example

A sample CONFIG.SYS file for MS-DOS 5 might look like this: <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>

:;*?!

Used to define labels within CONFIG.SYS, serving as jump points for directives such as , , , and .
Functions like , but additionally supports inline comments following other CONFIG.SYS commands. (In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
Also used for inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing the subsequent CONFIG.SYS command.[1] (FreeDOS does not provide optional messages but supports conditional execution with boot menus through and .) DOS 6.0 and later versions offer similar functionality by appending after commands (e.g., ).
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be interrupted upon encountering errors.
Controls whether file access date stamps are stored on FAT file systems.
Executes commands conditionally on AT-compatible hardware.
Boot manager utility.
Adjusts the verbosity level of error messages.
Changes the default serial driver assignment for the AUX device from COM1: through COM4:.
Prevents character devices from being accessible outside the virtual \DEV directory.
Loads a base device driver into memory.
Produces a beep sound even when audible alerts are disabled.
Defines which operating system to boot next.
Enables or disables extended Ctrl+C checking functionality.
Specifies the number of disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Manage cache block allocation and flushing intervals.
Loads external programs during CONFIG.SYS processing, pausing further processing until the program returns.
(DR-DOS 7.02+)
Sets keyboard Caps Lock status on or off.
, CDDBUFFERS (PTS-DOS only)
Configures CD-ROM driver name and buffer quantity.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from another file or label.
, CLS, CODEPAGE (PTS-DOS or OS/2 only)
Configure system clock type, clear screen command, and OEM codepage settings.
, COLOR (PTS-DOS only)
Sets CMOS RAM address and boot menu color schemes.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Configure serial port counts, I/O addresses, and timeouts.
, COMMENT(S) (various DOS versions)
Define DMA buffer sizes or redefine inline comment characters.
, CPOS, CPSW (various DOS versions)
Configure internationalization support, cursor positioning for menus, and codepage switching capabilities.
CPU*, CPU88*, CPU286*, CPU386*, CPU486* (PTS-DOS or DR-DOS)
Execute commands conditionally based on CPU type or generation.

This summarized list outlines essential CONFIG.SYS directives significant for managing system configurations across various DOS versions, focusing on business environments that require efficient boot processes and driver management.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment addresses used for multi-sector disk data deblocking operations.
Enables support for an internal debugger.
Boot manager utility.
Loads device drivers into conventional memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage parameters for keyboard, screen, and printer devices.
Configures sizes of cache memory allocations.
Specifies compatibility modes for floppy disk drives.
Determines display font selection.
Controls loading of DOS into high memory and usage of upper memory blocks.
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory areas.
Specifies alternative directories for DOS system files.
Defines search paths for data files.
Sets parameters related to physical disk drives.
Provides configuration options for unrecognized drives.
See .
Enables error logging with PDUMP.nnn files and specifies target drive location.
Controls display of messages on screen during processing.
Displays messages using ANSI escape sequences for enhanced formatting.
Enforces additional validation checks when launching programs.
Defines expected error or return codes from executed programs.
Sets the state of the A20 gate when starting programs.
Terminates CONFIG.SYS processing early except under certain conditions where SWITCHES and SHELL directives remain active.
Configures hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN implementation).
Specifies the number of cached File Control Blocks that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads File Control Blocks into upper memory areas.
Boot manager utility.
Defines maximum number of files that can be open concurrently.
Similar to FILES but explicitly loads file handles into upper memory regions.
Allows execution of specified subsections within CONFIG.SYS files (refer to 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 CONFIG.SYS execution at a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for further details.
Consult for additional information.
See for related commands.
Refer to or for more context.
See or for related usage.
Consult for further explanation.
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
Refer to , , or for more information.
See for related instructions.
Refer to or for additional details.
Activates console and command line history buffer with enhanced pattern search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures power-saving using the HLT instruction.
Enables scanning of boot sector viruses.
Loads installable file system drivers.
Prevents execution of specified sections within CONFIG.SYS.
Allows designated programs to operate at ring 2, enabling direct hardware input/output access.
Incorporates directives from another menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the status of the keyboard Insert mode.
Loads a TSR program into memory.
Installs a TSR program into upper memory (equivalent to HIINSTALL in DR DOS 5.0).
Loads a TSR program after relocating the DOS data segment (compare INSTCDEX).
Adjusts PIC interrupt priorities by rotating them to prioritize a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the address of the relocated keyboard buffer.
Specifies the maximum number of accessible drives.
Functions like LASTDRIVE but loads the Current Directory Structure into upper memory.
Lists paths where DLLs are searched for.
Manages compatibility settings for legacy software.
Determines the number of file locks allowed.
Controls display of boot logos and startup messages.
Specifies count, order, I/O address, and timeout settings for the LPT1 device.
Same parameters as LPT1 but applied to LPT2 device.
Same as LPT1 but configured for LPT3 device.
Enables and configures settings for LPT4 device.
Defines wait time before process priority is increased.
Configures strategy for memory allocation management.
Sets default method used by DOS for memory allocation.
Specifies available menu options within CONFIG.SYS.
Defines menu colors (can be emulated in DR-DOS).
Sets default menu block (emulatable in DR-DOS).
Creates a menu block (emulatable in DR-DOS).
Enables multitrack operations on disk drives.
Continues processing CONFIG.SYS from a new file after loading a driver and setting %NEWFILE%.

NTemplate:NbndQ

Defines default No () character used in Yes/No/Resume prompts.
Sets keyboard Num Lock status either on or off at startup.
Executes commands conditionally based on the last error code, e.g., .
Displays text and pauses until a key is pressed by the user.
Requires user confirmation when errors occur during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Conditional execution targeting PC-compatible systems only.
Adjusts scheduler priority levels.
Sets priority levels specifically for disk I/O operations.
Changes default printer device driver among LPT1, LPT3, or LPT4 ports.
Determines whether DOS programs are permitted to run.
Loads a user interface shell program during startup.
Conditional execution targeting IBM PS/1-compatible machines only.
Conditional execution targeting IBM PS/2-compatible machines only.
Silences output directed to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters to local block device drivers.
Defines the default character for Resume () prompts.
Enables returning from nested CONFIG.SYS processing to a prior GOSUB or SWITCH point, optionally passing a return code.
Specifies the size of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS running in the background.
Saves the initial character of deleted files within the FAT reserved section.
Determines video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Configures the Scroll Lock key status on the keyboard as enabled or disabled.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter for pre-allocating memory in HMA or UMBs to minimize fragmentation.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Controls whether files close upon pressing Ctrl+Alt+Del.
Skips the Power-On Self-Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Define hardware interrupt stack sizes and buffer locations across various DOS platforms and operating systems.
, SYSBOOT, SYSGEN, SYSLOAD
Manage boot processes and system loading for PTS-DOS.
, SWITCH
Creates submenu blocks with conditional nested CONFIG.SYS execution (available from DOS 6.0 onwards).
, SWAPPATH, THREADS
OS/2-specific features for error logging paths, swap file directories, and thread concurrency limits.
, TIMESLICE
Configures timeouts and scheduler time slices within CONFIG.SYS for DR-DOS, PTS-DOS, and OS/2 environments.
, TRACE, TRACEBUF
Control temporary file extensions and enable tracing of CONFIG.SYS execution across multiple DOS variants.
, SXFAKEHWFPU
Provides OS/2 error logging and activates fixes for floating-point unit (FPU) bugs.

UTemplate:NbndZ

Designates a particular memory segment as an Upper Memory Block (UMB) for DOS use.
Specifies the UMB server component.
Defines address ranges to be treated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version string reported to applications.
Configures VGA display status parameters.
Changes the current video mode, analogous to FreeDOS’s SCREEN command functionality.
Activates virtual DMA capabilities.
Controls processor Virtual Mode Extensions (VME).
Sets up VxD drivers for Windows environments.
Manages system support features related to Windows operating systems.
Relocates the Extended BIOS Data Area (XBDA).
Executes conditionally on XT-compatible hardware platforms.
Configures built-in Year 2000 compliance support mechanisms.
Sets the default affirmative response character in command prompts.
Tracks deletions of files.

Issues

Although the system can start without CONFIG.SYS or AUTOEXEC.BAT present, these configuration files are vital for customizing the operating system environment and loading necessary software components. When these files become corrupted or damaged, troubleshooting is required.

In cases where CONFIG.SYS lacks a SHELL directive or is missing/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 absent. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users to specify a path to a command processor. This prompt also appears if the primary shell process terminates unexpectedly or exits intentionally, providing limited shell functionality without rebooting.

Due to incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS systems, DR-DOS 7.02 and newer enforce SHELL directives during skip/trace/step operations. This prevents workarounds that were possible in earlier editions. Recovery options are available through specific key combinations that address invalid SHELL parameters or missing directives by requesting a valid shell filename before launching COMMAND.COM.

CONFIG.SYS file size restrictions differ among DOS variants: MS-DOS and PC DOS limit file sizes to a few kilobytes (with recent versions supporting up to 64 KB), whereas DR-DOS imposes no inherent size limit beyond filesystem constraints. This disparity arises because MS-DOS compiles CONFIG.SYS into tokenized memory structures that reorder directives—loading drivers before TSRs—while DR-DOS processes directives sequentially line-by-line, offering precise control over load order and enabling conditional execution based on hardware detection or user input.

This enhanced flexibility benefits organizations by allowing customized sequences for loading drivers and TSRs, resolving conflicts efficiently, and incorporating temporary software modules via the INSTALL directive within CONFIG.SYS.

Early MS-DOS releases restricted SHELL command lines to 31 characters maximum. Later versions extended this limit up to 128 characters, with DR-DOS supporting lengths up to 255 characters. It is important to note that 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 files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily reverted to CONFIG.SYS and AUTOEXEC.BAT. Additionally, backup copies of Windows 95's configuration files are saved as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain intact, while 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 prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, the information traditionally found in CONFIG.SYS is instead stored in the system registry rather than as a physical file.

Numerous CONFIG.SYS commands in OS/2 lack official documentation.

CONFIG.SYS continues to be employed by OS/2-based 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 guide to DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directives explained
  • PTS-DOS 2000 Pro User Manual covering CONFIG.SYS directives (partial)
  • Unofficial German-language PTS-DOS FAQ (PTS/FAQD) including additional CONFIG.SYS directives
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG