Jump to content

HIFILES (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article HIFILES (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983 (with DOS version 2.0)
ProductsConfiguration 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 setup instructions accessible to users, which the operating system's DOS BIOS interprets during the boot process. CONFIG.SYS made its debut with DOS version 2.0.

Usage

The directives within CONFIG.SYS customize DOS settings for hardware devices, software applications, and memory allocation. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL statement or defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

Primarily, the file contains name=value pairs that define adjustable parameters or load 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 manufacturer VEB Robotron.

Certain DOS versions search for alternative configuration filenames that override CONFIG.SYS:

- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI, storing settings in a binary file named CCONFIG.BIN. These platforms support extended configuration capabilities beyond those found in MS-DOS/PC DOS.

- In DR DOS starting from version 3.31, including distributions like PalmDOS, Novell DOS, and OpenDOS, DCONFIG.SYS supersedes CONFIG.SYS. This arrangement aids multi-boot environments and disk compression where drive letter assignments change after compression drivers load.

- OpenDOS versions 7.01 and DR-OpenDOS 7.02 additionally check for ODCONFIG.SYS, while some DR-DOS releases from 7.02 onward look for DRCONFIG.SYS.

- From DR DOS 6.0 onward, users can modify default file extensions using SYS /DR:ext, enabling multiple system files with different extensions to coexist in one root directory, selectable via boot loaders such as LOADER.

- The SHELL command has been extended to allow specification of alternative AUTOEXEC.BAT filenames; COMMAND.COM accepts non-.BAT extensions in these cases—a feature also supported by 4DOS.

- The CHAIN=filespec directive permits continuing configuration processing with files located outside the root directory, with optional support for labels introduced in DR-DOS 7.02+.

- Starting with DR-DOS 7.03+, the SYS /A option copies CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

In addition, FreeDOS uses FDCONFIG.SYS, RxDOS employs RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory of Windows 95 and 98 boot drives but are generally left empty. In contrast, Windows Me does not process CONFIG.SYS during startup; instead, it loads environment variables 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 to be loaded at boot time.

Example

A sample CONFIG.SYS 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>

:;*?!

Establishes labels within CONFIG.SYS that serve as jump points for , , , , and directives.
Functions similarly to , also used for inline comments following other commands. (Note: Under MS-DOS/PC DOS, inline comments enclosed in double quotes are not disregarded.)
Introduces inline commentary alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support optional messages but allows conditional execution via boot menus.) DOS version 6.0 and later accept comparable syntax by adding after directives.
Executes the next CONFIG.SYS command without conditions.

ATemplate:NbndC

Determines whether programs can be aborted upon encountering errors.
Sets which drives maintain file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot management utility.
Adjusts the verbosity level of error messages.
Alters the default serial device driver assignment (COM1: through COM4:) for the AUX device.
Deactivates character devices located outside the phantom \DEV directory.
Loads a base device driver into memory space.
Produces a beep sound even when notification sounds are disabled.
Defines the next operating system to start.
Enables or disables extended Ctrl+C detection.
Specifies the quantity of disk buffers to allocate.
Similar to BUFFERS but loads buffers into the High Memory Area (HMA) or Upper Memory Blocks (UMB).
Sets the maximum number of dynamically allocated cache blocks.
Determines the timeout before unused cache blocks are returned to the system pool.
Defines the interval before dirty cache blocks are flushed to disk storage.
Loads external programs within CONFIG.SYS, pausing processing until they return control.
Sets keyboard Caps Lock status at startup.
Names the CD-ROM driver to be used.
Specifies the number of buffers allocated for CD-ROM access.
Continues processing CONFIG.SYS from a different file or label location.
Defines system clock type in use.
Clears the display screen.
Specifies OEM codepage(s) for character encoding.
Designates CMOS RAM address parameters.
Configures boot menu color schemes.
Sets parameters for COM1 device including I/O port address and timeout values.
Configures COM2 device parameters in a similar manner.
Applies equivalent configuration settings to COM3 device parameters.
Applies equivalent configuration settings to COM4 device parameters.
Defines specifications for DMA buffer usage.
Redefines characters that initiate inline comments or causes the following line to be ignored.
Activates and configures international language support features.
Positions the cursor on screen within configuration menus.
Enables support for codepage switching functionality.
Specifies RAM refresh rate speed settings.
, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+ (PTS-DOS and DR-DOS)
Executes commands conditionally based on CPU type and generation.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables in memory.
Defines memory segment address used for multi-sector disk data deblocking operations.
Activates internal debugger functionality support.
Boot management utility command.
Loads device drivers into conventional memory space.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and codepage configurations for keyboard, screen, and printer devices (KBD, SCR, LPT).
Configures sizes of cache memory allocations.
Specifies compatibility mode settings for floppy disk drives.
Selects display font to be used by DOS interface.
Controls loading of DOS into high memory and utilization of upper memory blocks (similar to in DRDOS 5.0).
Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory areas.
Specifies an alternative directory path for DOS system files.
Defines search path locations for data files used by DOS utilities and drivers.
Sets physical characteristics parameters for disk drives connected to the system.
Establishes parameters applicable to drives that are not otherwise recognized by DOS.
See .
Enables error log creation and designates drive location for PDUMP.nnn files capturing system errors.
Displays a simple message on screen output during startup or processing phases.
Shows messages that include ANSI escape sequences for enhanced formatting control on screen output.
Implements additional validation checks when launching executable programs from DOS environment.
Specifies an error or return code value that will be assumed after program execution completes next in sequence.
Sets state of A20 gate line when starting executable programs to control memory access above 1MB boundary.
Terminates CONFIG.SYS processing prematurely except for certain SWITCHES and SHELL commands which continue processing afterward.
Defines hash table size used to accelerate file open operations, differing from MS-DOS/PC DOS FASTOPEN driver implementation approach.
Sets number of File Control Blocks (FCBs) cached simultaneously open at once (shares buffer with FILES parameter under DR-DOS environment).
Same as FCBS but explicitly loads FCBs into upper memory areas instead of conventional memory space explicitly stated here.
Boot manager command directive controlling boot sequence options and selections during system startup process.
Specifies maximum number of files allowed open concurrently by DOS processes and applications running in environment.
Same as FILES but explicitly loads file handles into upper memory region rather than default conventional RAM area allocation scheme used otherwise by DOS kernel functions here described explicitly for upper memory loading behavior only.
;: Includes execution of specified subsections within CONFIG.SYS files (see 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 processing of CONFIG.SYS at the designated label.
Continues nested CONFIG.SYS processing at the specified label, returning afterward to the original point.
Refer to , , or for additional details.
Consult for further information.
See for related commands.
Refer to or for more context.
Look at or for similar functionality.
See for related usage.
Loads a TSR program into memory similarly to , but after relocating the DOS data segment. Compare with INSTCDEX.
Refer to , , or for more examples.
Consult for additional related commands.
See or for more details.
Activates console and command line history buffer along with enhanced pattern search capabilities.
Defines the segment address for HMA (High Memory Area).
Sets energy-saving mode using HLT instruction.
Configures system checks to detect boot sector viruses.
Loads installable file system drivers.
Prevents execution of specific subsections within CONFIG.SYS.
Permits certain applications to operate at ring 2, allowing direct hardware I/O access.
Includes directives from another menu block (can be emulated with GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs TSR programs into conventional memory.
Loads TSR programs into upper memory, equivalent to HIINSTALL in DR-DOS 5.0.
Installs TSR after relocating DOS data segment, similar to INSTALL. Compare with INSTCDEX.
Rotates PIC interrupt priorities to elevate the priority of a specified IRQ line.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer’s memory address.
Sets the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory areas.
Lists directories where DLLs are searched for.
Manages compatibility settings for legacy software applications.
Determines the number of allowed file locks.
Enables boot logo support and startup messages when using PTS-DOS boot manager.
Configures parameters such as count, logical order, I/O address, and timeout for the LPT1 port.
Similarly configures settings for LPT2 device.
Applies comparable configuration to LPT3 device.
Enables and sets parameters for LPT4 port operation.
Defines delay before increasing process priority level.
Sets memory allocation methods and strategies.
Specifies default DOS memory allocation strategy preferences.
Defines options available in menus.
Sets color schemes for menus (can be emulated under DR-DOS).
Specifies default menu block (emulatable in DR-DOS environments).
Defines multiple menu blocks (also emulatable under DR-DOS).
Enables or disables multitrack disk drive operations.
Continues processing CONFIG.SYS from a new file after loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default character used as No () response in Yes/No/Resume prompts.
Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
Executes conditionally based on previous return code or error status, e.g., .
Displays a message and waits for a keypress, akin to and commands in DR-DOS systems.
Requires user confirmation upon encountering errors during CONFIG.SYS processing.
Configures buffer size settings for LPT ports.
Conditional execution directive specific to PC-compatible hardware platforms.
Adjusts scheduler priority settings within the system.
Sets priority levels specifically for disk I/O operations and programs.
Changes default printer device driver assignment among LPT1 through LPT4 ports.
Indicates whether DOS applications are permitted to run on the system.
Loads a graphical user interface component or shell environment.
Conditional execution directive targeting IBM PS/1-compatible machines specifically.
Conditional execution directive targeting IBM PS/2-compatible machines specifically.
Suppresses output sent to standard output (STDOUT) display.

RTemplate:NbndT

Activates automatic reboot when errors occur.
Permits inclusion of comments within CONFIG.SYS.
Reserves a drive letter specifically for local block device drivers.
Sets the default character for Resume () prompts in Yes/No/Resume dialogs.
Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH point, optionally providing a return code.
Defines the amount of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS by running them in the background.
Determines whether the first character of deleted filenames is stored in the FAT reserved area.
Specifies video mode settings under FreeDOS or screen access methods for PTS-DOS.
Configures the initial status of the keyboard Scroll Lock key (on or off).
Sets environment variables within the system.
Loads the command interpreter shell program.
Similar to SHELL but includes a size parameter to pre-allocate COMMAND.COM into HMA or UMBs, improving memory efficiency with third-party shells.
Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Determines whether files are closed automatically upon pressing Ctrl+Alt+Del.
Specifies whether POST (Power-On Self-Test) should be bypassed during reboot.
, STACKSIZE, STACKSHIGH, STACK (various DOS versions)
Configure stack parameters for hardware interrupts or threads, with some parameters ignored or used solely for compatibility depending on the DOS version.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB (PTS-DOS exclusive)
Manage boot manager configurations, alternative DOS boot files, system memory mapping, and loading DOS components into UMBs to optimize memory utilization.
, SUPPRESSPOPUPS, SWAPPATH (various OS versions)
Define submenu blocks for error logging drives and specify paths for swap files respectively.
, SWITCHES, SWITCHAR (various DOS versions)
Control conditional execution flow within CONFIG.SYS and set default switch characters ('/' or '-').
, THREADS, TIMESLICE (OS/2 specific)
Enable fixes for FPU bugs, set concurrent thread counts, and configure scheduler time slice durations.
, TMPEXT (DR-DOS and PTS-DOS)
Configure timeouts for commands in CONFIG.SYS and specify temporary file extensions.
, TRACEBUF (DR-DOS, PTS-DOS, OS/2)
Enable or disable single-stepping through CONFIG.SYS and AUTOEXEC.BAT execution with adjustable log buffer sizes.
, STORAGE (OS/2 specific)
Record detailed error logs to facilitate diagnostics.

UTemplate:NbndZ

Allocates a specific segment as an upper memory block (UMB) for DOS use.
Configures the upper memory block server settings.
Defines address ranges designated as UMB RAM.
Enables or disables verification of disk writes.
Sets the DOS version reported to applications.
Manages VGA display status parameters.
Indicates current video mode similar to FreeDOS's SCREEN command.
Activates virtual DMA functionality.
Controls processor Virtual Mode Extensions (VME).
Configures Windows VxD driver behavior.
Sets Windows system support options.
Adjusts relocation settings for the Extended BIOS Data Area (EBDA).
Enables conditional execution on XT-compatible computers.
Configures native Year 2000 compliance support.
Defines the default character used for Yes responses in prompts.
Manages file deletion tracking features.

Issues

Although the system is capable of booting without CONFIG.SYS or AUTOEXEC.BAT files present, these are crucial for comprehensive operating system customization and meeting software prerequisites. If these files become corrupted or damaged, troubleshooting is necessary.

When CONFIG.SYS does not contain a SHELL directive—or if it is missing or corrupted—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Earlier DOS releases prior to version 6.0 will fail to boot if COMMAND.COM is absent. However, MS-DOS version 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users to provide a path to a command processor. This prompt also appears if COMMAND.COM terminates unexpectedly or exits intentionally, offering a limited shell replacement during runtime without requiring a reboot.

COMMAND.COM from MS-DOS version 7.0 onward is incompatible with DR-DOS installations, which typically reside in C:\ within dual-boot environments. Starting with DR-DOS version 7.02, bypassing SHELL directives during skip, trace, or step modes is restricted. This design enhances system stability during boot failures by mandating valid shell input before loading COMMAND.COM.

Under MS-DOS and PC DOS, CONFIG.SYS file size is limited to a few kilobytes (up to approximately 64 KB in recent versions), whereas DR-DOS imposes no practical size limit other than those defined by the file system. MS-DOS compiles CONFIG.SYS into a tokenized format processed sequentially—loading device drivers before TSRs—while DR-DOS interprets each directive line-by-line. This approach allows precise control over load order and supports conditional execution based on hardware detection or error conditions. Such flexibility proves valuable when resolving conflicts or integrating debugging tools.

DR-DOS includes an INSTALL directive that enables execution of non-resident programs within CONFIG.SYS itself. This facilitates dynamic control flow adjustments and user interaction during system initialization.

In MS-DOS and PC DOS versions from 2.0 through 4.01, the SHELL command line was limited to a maximum length of 31 characters. Later versions expanded this limit up to 128 characters, while DR-DOS allows up to 255 characters. Notably, none of these CONFIG.SYS directives support long filenames.

Dual Booting DOS and Windows 9x

During the installation of Windows 95 over a pre-existing DOS/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. When booting into DOS mode, these files are temporarily restored to their original names, CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, backups of the Windows 95-specific versions are preserved as CONFIG.W40 and AUTOEXEC.W40.

In cases where Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, the Windows CONFIG.SYS and AUTOEXEC.BAT retain their standard names, whereas DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 / Windows NT

OS/2 makes extensive use of CONFIG.SYS for setting up drivers and environment variables prior to launching its graphical interface.

Within the OS/2 subsystem of Windows NT, CONFIG.SYS is presented to OS/2 applications but is actually maintained within the system registry.

There exist several undocumented CONFIG.SYS commands specific to OS/2.

CONFIG.SYS continues to be employed by OS/2 successors 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) – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directives explained
  • PTS-DOS 2000 Pro User Manual with CONFIG.SYS command details (archived)
  • Unofficial German PTS-DOS FAQ including extended CONFIG.SYS directives (archived)