Jump to content

PRIORITY (CONFIG.SYS directive)

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

CONFIG.SYS serves as the chief configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, holds configuration commands that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during the startup process. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are responsible for setting up DOS to manage devices, applications, and memory management utilities. Once CONFIG.SYS has been processed, DOS proceeds to launch the command interpreter specified by the SHELL directive; if none is specified, it defaults to COMMAND.COM. This shell then executes commands from AUTOEXEC.BAT.

Typically, the file consists of name=value pairs that define system parameters or instruct the loading of device drivers and terminate-and-stay-resident (TSR) programs into memory.

Within DOS environments, CONFIG.SYS is located in the root directory of the bootable disk.

Certain MS-DOS variants utilize alternative configuration filenames that take precedence over CONFIG.SYS:

Advanced editions such as Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS (derived from "Concurrent") instead of CONFIG.SYS. Multiuser DOS may also employ CCONFIG.INI, with configurations stored in a binary format named CCONFIG.BIN, which can be edited through CONFIG.EXE. Meanwhile, REAL/32 searches for MCONFIG.SYS. These platforms offer extended configuration capabilities beyond those found in MS-DOS or PC DOS.

In versions of DR DOS starting with 3.31—including PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 and newer—a DCONFIG.SYS file supersedes CONFIG.SYS. Originally designed for disk compression utilities to handle drive letter reassignment, DCONFIG.SYS also supports multi-boot setups. OpenDOS 7.01 and DR-OpenDOS 7.02 additionally recognize ODCONFIG.SYS, and some DR-DOS 7.02+ releases detect DRCONFIG.SYS.

DR-DOS versions from 6.0 onward allow users to customize default system file extensions using SYS /DR:ext, enabling multiple sets of system files within the root directory that can be selected via boot loaders like LOADER (utilized by Multiuser DOS and DR-DOS 7.02/7.03). The SHELL command supports specifying alternative AUTOEXEC.BAT files, including those with non-.BAT extensions compatible with 4DOS. The CHAIN=filespec directive permits continuation of configuration processing from another file and can optionally jump to designated labels in DR-DOS 7.02 and later versions.

Starting with DR-DOS 7.03, the SYS /A command copies both CONFIG.SYS and AUTOEXEC.BAT alongside essential system files.

FreeDOS uses a comparable configuration file named FDCONFIG.SYS; RxDOS version 7.24 and above utilize RXCONFIG.SYS; while PTS-DOS employs CONFIG.PTS.

In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT reside in the root directory of the boot drive but are generally left empty.

Unlike its predecessors, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:

HKLM\System\CurrentControlSet\Control\SessionManager\Environment

Within the FlexOS operating system, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at boot time.

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>

:;*?!

Establishes labels within CONFIG.SYS to serve as jump destinations for , , , and commands.
Functions similarly to , allowing inline comments to follow other directives. (Note: In MS-DOS/PC DOS, inline comments enclosed in quotes are not disregarded.)
Used to begin inline comments in conjunction with the ; directive.
Prompts a Yes/No confirmation before proceeding with subsequent directives.[1] (FreeDOS does not support optional messages but allows conditional processing with boot menus defined by and .) DOS version 6.0 and later provide comparable functionality by appending to directives, e.g., .
Executes the following directive without conditions.

ATemplate:NbndC

Determines whether applications can be terminated upon encountering errors.
Configures which drives record file access date stamps within FAT file systems.
Enables conditional execution exclusively on AT-compatible hardware.
Boot management utility.
Adjusts verbosity levels for error messages.
Alters the default serial device driver assigned to the AUX device.
Restricts availability of character devices outside the phantom \DEV directory.
Loads the base device driver into system memory.
Produces a brief beep sound even when audible notifications are disabled.
Designates the operating system to boot next.
Enables or disables extended Ctrl+C detection.
Specifies how many disk buffers should be allocated.
Similar to BUFFERS but allocates buffers within HMA or UMB memory areas.
, CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
Controls cache block allocation and timing for flushing operations.
Loads programs specified in CONFIG.SYS and executes them in the foreground, pausing further processing until completion.
(DR-DOS 7.02+)
Defines keyboard Caps Lock state.
, CDDBUFFERS (PTS-DOS only)
Sets parameters for CD-ROM driver buffering.
(DR DOS 5.0+, Embedded DOS)
Continues processing CONFIG.SYS from a new file or label.
, CLS, CODEPAGE (PTS-DOS or OS/2 only)
Configures system clock type, clears the screen, and specifies OEM codepages.
, COLOR (PTS-DOS only)
Defines CMOS RAM address and colors for boot menus.
, COM2, COM3, COM4 (DR-DOS 7.02+)
Sets up serial port quantity, order, I/O addresses, and timeouts.
, COMMENT(S), COUNTRY, CPOS, CPSW (various DOS versions)
Manage DMA buffer settings, comment lead characters, internationalization support, cursor position display, and codepage switching respectively.
CPU-related directives (PTS-DOS only)
CPU88, CPU86, CPU286, CPU386, CPU486 along with their + variants specify conditional execution based on processor type or speed.

DTemplate:NbndF

Adjusts relocation of drive descriptor tables in memory.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionalities.
Boot management utility.
Loads device drivers into system memory.
Loads device drivers into upper memory blocks (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and printer devices.
Specifies sizes for cache memory allocation.
Configures floppy disk compatibility modes.
Selects display font settings.
Controls loading of DOS into high memory and/or use of upper memory areas.
Specifies loading of DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
Provides an alternative directory path for DOS files.
Defines search paths for data files.
Sets physical disk drive parameters like geometry and characteristics.
Establishes parameters for drives that are not recognized by default.
See .
Enables drive assignment for PDUMP.nnn error log files.
Displays text messages on screen during processing.
Outputs messages containing ANSI escape sequences for enhanced formatting.
Specifies additional checks when starting programs.
Assigns assumed error or return codes for subsequent commands.
Controls A20 line gate state during program startup sequences.
Terminates CONFIG.SYS processing prematurely except for specific directives that must continue execution.
Adjusts hash table size used to accelerate file opening operations, differing from MS-DOS FASTOPEN driver functionality.
Defines the number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory areas.
Boot management setting related to drive assignments or options.
Specifies maximum number of files that can be opened concurrently by the system.
Like FILES but loads file handles explicitly into upper memory blocks.
Includes execution of designated CONFIG.SYS subsections as referenced by IGNORE.

GTemplate:NbndI

Pauses execution awaiting a key press or timeout, setting the error level to the ASCII value of the key pressed or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS execution at a specified label, then returns to the prior point.
Refer to , , or for additional context.
Consult for further details.
See for more information.
Refer to or for related commands.
See or for further reference.
Consult for usage guidelines.
Loads a TSR (Terminate and Stay Resident) program into memory after relocating the DOS data segment.
Refer to , , or for more information.
See for additional details.
Refer to or as needed.
Activates console and command line history buffer with enhanced pattern searching capabilities.
Assigns the address of the High Memory Area (HMA) segment.
Sets up energy-saving mode via HLT instruction configuration.
Enables scanning of the boot sector for viruses during startup.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits select programs to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block, emulated through GOSUB/RETURN in DR-DOS environments.
Sets the status of the keyboard's Insert mode.
Installs a TSR program into conventional memory.
Loads TSR into upper memory area, similar to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment.
Adjusts PIC interrupt priorities to assign highest priority to a given IRQ line.

KTemplate:NbndM

Defines the keyboard layout configuration.
Sets the relocated address for the keyboard buffer.
Specifies the maximum number of drives accessible by the system.
Similar to LASTDRIVE but additionally loads Current Directory Structure into upper memory.
Establishes search paths for dynamic-link libraries (DLLs).
Controls handling of legacy applications.
Determines the number of allowable file locks.
Configures display settings for boot logos when using PTS-DOS boot manager.
Specifies count, priority order, I/O address, and timeout parameters for LPT1 parallel port device.
Applies similar configuration parameters to LPT2 device as for LPT1.
Sets parameters for LPT3 parallel port device configuration.
Enables and configures LPT4 device functionality.
Defines wait time before increasing process priority level.
Adjusts strategy for memory allocation management.
Establishes default method for DOS memory allocation procedures.
Defines available menu options within CONFIG.SYS interface.
Specifies color schemes for menus, with emulation possible in DR-DOS environments.
Sets default menu block, emulatable under DR-DOS systems.
Defines individual menu blocks, with emulation support in DR-DOS variants.
Toggles multitrack disk operation support on or off.
Continues processing CONFIG.SYS from a different file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default 'No' character used in Yes/No/Resume prompt dialogs.
Turns keyboard [[Num Lock|Template:Keypress]] status on or off at startup.
Enables conditional command execution based on previous error code values, such as .
Displays a message and waits for a key press, functioning similarly to and commands under DR-DOS systems.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Configures buffer sizes allocated to LPT parallel ports.
Enables conditional execution specifically on PC-compatible hardware platforms.
Sets scheduler priority levels for processes at startup.
Assigns priority levels specifically for disk I/O related programs during booting sequence.
Changes default printer device driver from LPT1 to LPT3 or LPT4 as specified by user configuration.
Specifies whether DOS applications are permitted to run within the environment.
Loads an alternative user interface shell during system initialization.
Enables conditional command execution on IBM PS/1-compatible machines only.
Enables conditional execution on IBM PS/2-compatible hardware platforms exclusively.
Suppresses output directed to standard output (STDOUT).

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS.
Allocates drive letters reserved by local block device drivers.
Establishes the default Resume () character used in command prompts.
Returns control from nested CONFIG.SYS processing back to the previous GOSUB or SWITCH location, optionally passing a return code.
Specifies the amount of real-mode memory available.
Enables simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Determines whether the first character of deleted files is stored in the FAT reserved area.
Sets video display mode under FreeDOS or defines screen access methods for PTS-DOS.
Controls the Scroll Lock key state on the keyboard.
Assigns environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a SIZE parameter allowing pre-allocation of COMMAND.COM in HMA or UMBs to minimize fragmentation.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Specifies whether files are closed upon pressing Ctrl+Alt+Del.
Skips the Power-On Self-Test (POST) during system reboot.
, STACKSIZE, STACKSHIGH
Configure interrupt stack sizes and buffer locations across multiple DOS versions and Embedded DOS variants.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB (exclusive to PTS-DOS)
Manage boot manager configurations, alternative system boot files, memory placement of DOS components, and loading of DOS data or code into UMBs.
, SUPPRESSPOPUPS (available in DOS 6.0+ and OS/2)
Define submenu blocks or designate a drive for logging errors instead of displaying pop-up messages.
, THREADS, TIMESLICE (OS/2)
Set parameters for swap file paths, concurrent thread counts, and scheduler time slice durations.
, SWITCHES, SWITCHAR
Control nested CONFIG.SYS processing behavior, enable special options, and establish default switch characters such as '/' or '-'.
, TRACE, TRACEBUF (various OS versions)
Activate fixes for floating-point unit bugs, allow single-step execution within CONFIG.SYS/AUTOEXEC.BAT scripts, and set the size of trace log buffers.
, TRAPDUMP (PTS-DOS, OS/2)
Specify temporary file extensions for error dumps and enable detailed logging of system errors.

UTemplate:NbndZ

Configures DOS to treat a specified memory segment as Upper Memory Block (UMB) space.
Selects the UMB server implementation to use.
Defines address ranges allocated as UMB RAM areas.
Enables or disables verification of disk writes.
Reports a specific DOS version number to software applications.
Controls VGA display status settings.
Sets the current video mode similarly to FreeDOS's SCREEN command.
Determines whether virtual DMA functionality is permitted.
Enables or disables processor Virtual Mode Extensions.
Configures VxD driver settings for Windows environments.
Sets Windows system support parameters.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible machines.
Activates built-in support for Year 2000 compliance.
Specifies the default 'Yes' character used in prompt responses.
Configures tracking for file deletions.

Issues

While it is possible for the system to start without CONFIG.SYS or AUTOEXEC.BAT files present, these configuration files are crucial for comprehensive customization and meeting software prerequisites. If either file becomes corrupted, troubleshooting is required.

In cases where CONFIG.SYS lacks a SHELL directive or if it is missing or damaged, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS versions prior to 6.0 will fail to boot without this file. However, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and later versions will prompt users to specify a command processor path. This recovery prompt also appears if the main command interpreter terminates unexpectedly or is exited intentionally, offering limited runtime shell replacement without needing a reboot.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS systems but frequently resides on dual-boot setups’ root drives. DR-DOS versions 7.02 and later prevent bypassing SHELL directives during certain skip or trace modes to avoid issues caused by invalid shell arguments. Users are therefore required to specify a valid shell executable before loading COMMAND.COM.

CONFIG.SYS file size restrictions vary depending on the operating system: MS-DOS and PC DOS impose limits of a few kilobytes (up to approximately 64 KB in later releases), whereas DR-DOS does not enforce practical limits due to its line-by-line interpretation method rather than tokenizing and sorting lines. This approach grants DR-DOS users enhanced flexibility in controlling driver and TSR loading order via DEVICE and INSTALL commands, facilitating conflict resolution and enabling integration of non-resident software into CONFIG.SYS execution flow.

Early MS-DOS editions restricted the length of SHELL command lines to 31 characters, which was later expanded up to 128 characters. In contrast, DR-DOS supports command lines up to 255 characters in length. It should be noted 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 system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. Selecting the DOS boot option temporarily reverts these files to their original filenames. Meanwhile, Windows 95 maintains backup copies of its versions as CONFIG.W40 and AUTOEXEC.W40.

In setups where Caldera DR-DOS 7.02 or 7.03 coexists with Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT files are left intact. Instead, DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.

OS/2 and Windows NT

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

Within the OS/2 subsystem embedded in Windows NT, the CONFIG.SYS file accessed by OS/2 applications is actually maintained within the system registry.

Numerous CONFIG.SYS commands implemented by OS/2 are either undocumented or lack thorough documentation.

The use of CONFIG.SYS continues in 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 CONFIG.SYS directives for Windows 98 / MS-DOS 7.10 (archived)
  • Caldera's CONFIG.SYS Command Reference – summary of DR-DOS 7 directives (archived)
  • Details on FreeDOS CONFIG.SYS commands
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS directives (archived)
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) covering CONFIG.SYS commands (archived)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG