Jump to content

DPATH (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article DPATH (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 20251 source
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration file for DOS and OS/2 operating systems

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

Usage

The directives contained within CONFIG.SYS configure DOS to manage devices, applications, and memory handling utilities. Once CONFIG.SYS has been processed, DOS initiates the command interpreter indicated by the SHELL directive or defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

Primarily, the file is composed of name=value entries that define adjustable parameters or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the boot drive’s root directory.

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

Certain DOS derivatives recognize alternative filenames that take precedence over CONFIG.SYS:

Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 employ CCONFIG.SYS instead of CONFIG.SYS. Multiuser DOS might use CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms maintain extra settings within CCONFIG.BIN, which is managed through CONFIG.EXE, enabling functionalities like INIT_INSTALL absent from MS-DOS/PC DOS.

Starting with DR DOS 3.31 and continuing through PalmDOS 1.0 and Novell DOS 7, a file named DCONFIG.SYS overrides CONFIG.SYS. This feature facilitates disk compression and multi-boot configurations by allowing multiple setup files. OpenDOS versions 7.01 and DR-OpenDOS 7.02 also check for ODCONFIG.SYS, while some DR-DOS editions look for DRCONFIG.SYS.

From DR DOS 6.0 onward, the command SYS /DR:ext enables customization of system file extensions, permitting several configurations to coexist within a single root directory and be selected via boot loaders such as LOADER found in Multiuser DOS and DR-DOS 7.x. The SHELL command supports specifying alternate AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM accepting extensions beyond ".BAT" in this context—a capability also offered by 4DOS.

DR-DOS versions 6.0 and later provide a CHAIN=filespec directive to continue processing configuration data from files located outside the root directory; versions 7.02 and newer add support for jumping to labels within chained files. Additionally, DR-DOS 7.03+ includes a SYS /A option that copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

Other systems use distinct configuration filenames: FreeDOS employs FDCONFIG.SYS, RxDOS uses RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.

Windows 95 and Windows 98, which are built on DOS foundations, retain CONFIG.SYS and AUTOEXEC.BAT in their boot partitions—though these files are generally empty—whereas Windows Me ignores CONFIG.SYS entirely during startup, opting instead to load environment variables directly from the Windows Registry.

In contrast, under FlexOS, CONFIG.SYS is a binary format file that specifies resource managers and device drivers to be loaded at 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 points for , , , , and .
Functions similarly to , also used for inline commentary following directives. (Note that in MS-DOS/PC DOS, inline comments inside quotes are not ignored.)
Introduces inline comments as an alternative to the ; directive.
Prompts the user with a Yes/No confirmation before executing subsequent commands.[1] (FreeDOS lacks customizable messages but supports conditions via boot menus.) DOS 6.0 and later provide a comparable feature by appending to directives, e.g., .
Executes the following directive without condition.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Specifies which drives record file access timestamps in FAT directories.
Enables conditional execution on AT-compatible hardware.
Manages boot loading.
Adjusts the verbosity of error messages.
Changes the default serial device driver assigned to the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a base device driver into memory.
Produces a beep sound regardless of notification settings.
Defines which operating system will boot next.
Enables or disables extended Ctrl+C interrupt checking.
Sets the quantity of disk buffers allocated.
Similar to BUFFERS but loads buffers into HMA or UMB memory areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Control cache block allocation timing and flushing behavior.
Loads executable programs within CONFIG.SYS, pausing processing until completion.
Sets the Caps Lock key status on the keyboard.
, CDDBUFFERS (PTS-DOS only)
Defines the CD-ROM driver name and buffer count.
Continues processing CONFIG.SYS from another file or label.
, CLS, CODEPAGE, CMOSADDR, COLOR (PTS-DOS or OS/2 specific)
Configure system clock clearing, OEM codepages, CMOS RAM address, and boot menu color schemes respectively.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Specify count, order, I/O addresses, and timeout values for serial COM ports.
, COMMENT(s), COUNTRY
Set DMA buffer for COMAREA (PTS-DOS), redefine comment prefix characters or ignore lines (various DOS versions), and enable international support respectively.
, CPSW (MS-DOS specific), CPU series (PTS-DOS only)
Set cursor positions for menus, support codepage switching, and enable conditional execution based on CPU type or speed.

This concise summary outlines essential CONFIG.SYS directives pertinent to system setup and boot management across various DOS flavors and OS/2 environments, vital for enhancing legacy system functionality and compatibility in professional settings.

DTemplate:NbndF

Configures relocation of drive descriptor tables in memory.
Defines memory segment limit up to which multi-sector disk data deblocking is permitted.
Activates internal debugger functionality.
Manages boot loading operations.
Loads a device driver into system memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage information for keyboard, screen, and printer devices.
Adjusts cache memory size parameters.
Specifies compatibility mode for floppy disk drives.
Selects display font settings.
Controls loading DOS into high memory and usage of upper memory areas.
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory segments.
Defines an alternative directory path for DOS files.
Specifies search paths for data files used by DOS utilities.
Configures physical disk drive parameters for proper recognition.
Sets parameters for unidentified drives within the system.
Refer to for additional details.
Enables error log creation with PDUMP.nnn files on specified drives.
Displays textual messages on screen during boot or configuration phases.
Shows messages incorporating ANSI escape sequences for formatting effects.
Applies extra verification checks when launching programs.
Assigns assumed error or return codes for subsequent commands in batch files or scripts.
Controls A20 gate status when initiating programs to manage memory addressing above 1MB.
Terminates CONFIG.SYS processing prematurely except for SWITCHES and SHELL directives under certain conditions.
Sets the size of hash tables used to accelerate file opening processes, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Defines how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES parameter under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory regions.
Manages boot loading procedures within CONFIG.SYS context.
Specifies maximum number of files that may be opened concurrently by the system.
Functions like FILES but explicitly loads file handles into upper memory segments.
Incorporates execution of designated CONFIG.SYS subsections through IGNORE directive references.

GTemplate:NbndI

Waits for a key press or timeout, then assigns the error level to the corresponding ASCII value (or 1024 if timeout occurs).
Resumes processing of CONFIG.SYS at the designated label.
Continues nested CONFIG.SYS execution at a label, returning afterward to the prior location.
Refer to , , or for additional details.
See also .
Consult .
Refer to or for further information.
See or for more.
Consult .
Loads a TSR program into memory after relocating the DOS data segment; compare with INSTCDEX.
Refer to , , or for related commands.
See also .
Consult or for more information.
Activates console and command line history buffers along with enhanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Configures energy-saving behavior related to HLT instruction usage.
Performs boot sector virus scanning during startup.
Loads installable file system drivers.
Excludes execution of specified sections within CONFIG.SYS.
Permits certain applications to operate at ring 2 level, allowing direct hardware I/O access.
Incorporates directives from an alternate menu section (emulated via GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs TSR programs into conventional memory.
Installs TSR utilities into upper memory areas (similar to HIINSTALL in DR DOS 5.0).
Loads TSR programs after relocating the DOS data segment; see also INSTCDEX.
Adjusts PIC interrupt priority levels to assign highest priority to a specified IRQ line.

KTemplate:NbndM

Selects the keyboard layout configuration.
Defines the memory address of the relocated keyboard buffer.
Determines the maximum number of accessible drive letters.
Functions like LASTDRIVE but loads Current Directory Structure into upper memory regions.
Lists directories searched for DLL files.
Controls loading behavior of legacy software applications.
Sets the number of file locks permitted simultaneously.
Configures boot logo display when using PTS-DOS boot manager.
Specifies count, sequence, I/O port address, and timeout settings for LPT1 printer device.
Applies identical configurations as LPT1 for LPT2 printer device.
Mirrors LPT1 settings for LPT3 printer device.
Enables and sets parameters for LPT4 device similarly to others.
Defines wait duration before elevating process priority level.
Establishes memory allocation policy parameters.
Specifies default strategy for DOS memory allocation management.
Defines options available within menus.
Sets color schemes for menus (emulated through ECHO commands in DR-DOS).
Determines the default menu block (simulated via TIMEOUT and SWITCH commands in DR-DOS).
Defines multiple menu blocks (implemented via ECHO and SWITCH in DR-DOS).
Enables support for multitrack disk operations.
Continues CONFIG.SYS processing from a new file after loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets the default character representing "No" () in Yes/No/Resume prompts.
Specifies the status of the keyboard Num Lock key ([[Num Lock|Template:Keypress]]).
Enables conditional execution based on the most recent error code, e.g., .
Displays text and waits for a key press, similar to and commands under DR-DOS.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Configures buffer sizes assigned to LPT ports.
Allows conditional execution limited to PC-compatible systems.
Sets scheduling priority levels for processes.
Assigns priority specifically to disk I/O-related programs.
Changes default printer driver assignment from LPT1 to LPT3 or LPT4 devices.
Indicates whether DOS applications are permitted to run.
Loads a user interface shell program.
Enables conditional execution restricted to IBM PS/1-compatible computers.
Enables conditional execution restricted to IBM PS/2-compatible machines.
Suppresses output sent to STDOUT display.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Allocates drive letters for local block device drivers.
Defines the default character used for Resume () prompts.
Enables returning from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally with a return code.
Sets the size of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS in the background.
Saves the initial character of deleted files in a reserved FAT area.
Determines video mode settings under FreeDOS or screen access methods under PTS-DOS.
Controls the status of the keyboard Scroll Lock key.
Establishes environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a size parameter enabling COMMAND.COM to load into HMA or UMBs, improving memory usage with third-party shells.
Sets keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files close automatically when Ctrl+Alt+Del is pressed.
Skips Power-On Self Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Manage hardware interrupt stack sizes and thread stack allocations across various DOS versions and embedded systems, including upper memory support where applicable.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
PTS-DOS-specific options for boot configuration, alternate system loading methods, and positioning DOS components within upper memory blocks (UMBs).
, SWITCH
DOS directives for menu-driven configuration and conditional nested processing in CONFIG.SYS (supported with RETURN in DR-DOS).
, SWAPPATH, THREADS, TIMESLICE
OS/2 parameters controlling error log suppression, swap file location, thread concurrency levels, and scheduler time slice adjustments.
, SWITCHES
Define system switch characters ('/' or '-') and special options in DOS environments except PTS-DOS where these are ignored.
, TRAPDUMP
OS/2 Warp fixes addressing FPU rounding issues and detailed error logging features.
, TRACE, TRACEBUF
Manage timeouts for CONFIG.SYS commands and enable single-step execution tracing with adjustable log buffer sizes across DR-DOS, PTS-DOS, FreeDOS, and OS/2 systems.
, SAVENAME
Specify temporary file suffixes (PTS-DOS) and store initial deleted file characters in FAT reserved areas (PTS-DOS).

UTemplate:NbndZ

Configures DOS to utilize a designated segment as Upper Memory Block (UMB) space.
Determines which UMB server is employed.
Defines address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version number reported to applications.
Controls VGA display status settings.
Specifies current video mode similarly to FreeDOS's SCREEN command.
Indicates whether virtual DMA functionality is permitted.
Enables or disables the processor's Virtual Mode Extensions (VME).
Configures Windows VxD drivers.
Sets system support parameters for Windows environments.
Manages relocation of the Extended BIOS Data Area (XBDA).
Allows conditional execution on XT-compatible hardware platforms.
Configures integrated Year 2000 compliance support.
Defines the default character used for Yes responses in prompts.
Controls tracking of file deletions.

Issues

Although the system can start without the presence of CONFIG.SYS or AUTOEXEC.BAT, these files are crucial for complete operating system customization and meeting software prerequisites. If either file becomes corrupted, troubleshooting is required.

When CONFIG.SYS does not include a SHELL directive or is absent altogether, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to MS-DOS 6.0 will not boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify a command processor path if it is missing. This prompt also occurs if the main command processor terminates unexpectedly or exits intentionally, allowing for a limited runtime shell replacement without rebooting.

The COMMAND.COM from MS-DOS 7.0 and later is incompatible with DR-DOS, which is commonly installed in C:\ within dual-boot environments. DR-DOS versions 7.02 and above prevent skipping SHELL directives during skip, trace, or step modes to avoid conflicts. Some newer versions introduced mechanisms to recover from invalid SHELL parameters by reactivating skip mode and requesting valid shell filenames before loading COMMAND.COM.

The maximum size of CONFIG.SYS varies depending on the DOS version—MS-DOS and PC DOS impose limits up to 64 KB, while DR-DOS only restricts size based on file system capabilities. MS-DOS processes CONFIG.SYS by compiling it into a tokenized structure in memory that organizes directives by execution order, prioritizing drivers over TSRs. Conversely, DR-DOS parses CONFIG.SYS sequentially line-by-line, enabling detailed control over loading sequence through DEVICE and INSTALL commands. This method helps resolve conflicts or load debugging tools before drivers and supports conditional logic based on processor type, key status, error conditions, or return codes. It also allows integration of non-resident programs within the CONFIG.SYS execution flow.

In MS-DOS and PC DOS versions 2.0 through 4.01, the length of the SHELL directive was limited to 31 characters; later editions expanded this limit to 128 characters, while DR-DOS permits up to 255 characters. None of the CONFIG.SYS directives support long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows installation, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality between Windows 9x and DOS environments. Booting into DOS temporarily restores these files under their original names. Copies of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.

In systems with Caldera DR-DOS 7.02 or 7.03 running alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files remain unaltered. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 / Windows NT

OS/2 depends extensively on CONFIG.SYS for setting up device drivers and environment parameters prior to launching its graphical user interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS is virtualized inside the registry rather than existing as an actual file on disk.

Numerous CONFIG.SYS directives for OS/2 lack comprehensive documentation or remain undocumented.

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 – Computer Hope (2017)
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands – Microsoft Support (archived)
  • CONFIG.SYS command guide – Caldera (1998) (partial DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS command explanations
  • PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS commands (partial)
  • Unofficial German PTS-DOS FAQ (2004), containing extra CONFIG.SYS commands
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG