Jump to content

HIINSTALL (CONFIG.SYS directive)

From Alfawiki
Adapted from the English Wikipedia article HIINSTALL (CONFIG.SYS directive), available under CC BY-SA 4.0Updated 9 August 2025
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsOperating system configuration

CONFIG.SYS serves as the main configuration file for both DOS and OS/2 operating systems. This file is a plain ASCII text document containing setup instructions accessible to users, which the operating system's DOS BIOS reads during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to configure DOS settings related to hardware devices, software applications, and memory management. Once CONFIG.SYS has been processed, DOS launches the command interpreter designated on the SHELL line; if none is specified, it defaults to COMMAND.COM, which then executes commands in AUTOEXEC.BAT.

Typically, this file consists of name=value entries that set adjustable parameters or load device drivers and terminate-and-stay-resident programs (TSRs) into system memory.

In DOS systems, CONFIG.SYS is located in the root directory of the bootable drive.

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

- Advanced editions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prioritize CCONFIG.SYS or CCONFIG.INI, storing extended configuration details in a binary file named CCONFIG.BIN, typically managed through CONFIG.EXE. - For DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS 7.02 or newer, DCONFIG.SYS takes precedence over CONFIG.SYS to facilitate disk compression and multi-boot configurations. - OpenDOS versions 7.01 and DR-OpenDOS 7.02 look for ODCONFIG.SYS, while some iterations of DR-DOS also recognize DRCONFIG.SYS. - Since DR DOS 6.0, the SYS /DR:ext command enables customization of default system file extensions, allowing multiple concurrent system files and configurations selectable via boot loaders such as LOADER included with Multiuser DOS and DR-DOS. - The SHELL directive can specify alternative AUTOEXEC.BAT files using /P[:filename.ext], with COMMAND.COM allowing extensions other than .BAT in this mode. - Starting with DR-DOS 6.0, the CHAIN=filespec directive allows continuation of processing another configuration file, optionally jumping to specific labels within it.

FreeDOS employs FDCONFIG.SYS; RxDOS uses RXCONFIG.SYS; and PTS-DOS utilizes CONFIG.PTS.

In Windows 95 and 98 boot drives, both CONFIG.SYS and AUTOEXEC.BAT exist in the root directory due to their DOS heritage but are generally left empty. Windows Me does not parse CONFIG.SYS at startup; instead, it loads environment variables from the Windows Registry.

In contrast, under FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during system initialization.

Example

Below is a sample CONFIG.SYS file 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 that serve as jump destinations for , , , and commands.
Functions like , but can also be used for inline comments following other directives. (Note: MS-DOS/PC DOS does not ignore inline comments enclosed in double quotes.)
Introduces inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports optional conditions with boot menus.) DOS 6.0 and later offer a similar feature by appending a after the directive, which is also supported by DR DOS.
Executes the following directive unconditionally.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Defines which drives maintain file access timestamps within FAT file systems.
Enables conditional execution on AT-compatible computers.
Manages the boot process.
Adjusts the verbosity level of error messages.
Alters the default internal serial device driver for the AUX port.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a fundamental device driver into system memory.
Produces a brief beep sound even if audible alerts are turned off.
Specifies the operating system to load next during boot.
Enables or disables extended Ctrl+C interrupt checking.
Sets the number of disk buffers to allocate.
Similar to BUFFERS but allocates buffers in HMA or UMB areas.
Defines the maximum count of cache blocks allocated from the system pool.
Sets the maximum duration before unused cache blocks are released back to the pool.
Specifies the maximum interval before dirty cache blocks are flushed to disk.
Loads programs listed in CONFIG.SYS and pauses processing until they return control.
Indicates whether keyboard Caps Lock should be on or off at startup.
Names the CD-ROM hardware driver to use.
Determines the number of buffers designated for CD-ROM access.
Continues processing of CONFIG.SYS from another file or label.
Selects the type of system clock used.
Clears the display screen.
Specifies OEM code page(s) for character encoding.
Identifies CMOS RAM address locations.
Defines color settings for boot menu displays.
, ;, ;, ;

Sets parameters such as count, sequence, I/O address, and timeout values for COM ports (available in DR-DOS 7.02 and later).

Defines buffer allocation for DMA operations (specific to PTS-DOS).
, ;

Allows redefinition of inline comment lead characters or causes the following line to be ignored, depending on OS behavior.

Activates and configures international language support (varies by operating system).

Positions the display cursor within configuration menus (introduced in DR DOS 6.0 and later).

Supports code page switching functionality (present in MS-DOS 4.x but disregarded in DR-DOS 7.02+). Conditional CPU execution commands available in PTS-DOS and DR-DOS include: CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+.

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment address used for multi-sector disk data deblocking operations.
Enables built-in debugger functionality.
Manages boot loading procedures.
Loads specified device drivers into memory.
Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
Sets country and code page parameters for keyboard, screen, and printer devices.
Configures sizes for various cache components.
Selects floppy disk compatibility modes.
Specifies font settings for display output.
Controls whether DOS loads into high memory and utilizes upper memory blocks.
Loads DOS configuration tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory regions.
Defines an alternative search path for locating DOS files.
Specifies path(s) for searching data files.
Sets physical parameters for disk drives.
Establishes parameters for drives that are not natively recognized by the system.
Refer to for additional information.
Enables error logging and designates a drive for storing log files.
Displays a message on the screen during startup or configuration.
Shows messages including ANSI escape codes for enhanced formatting.
Activates extra validation checks when launching programs.
Assigns an assumed error or return code to subsequent commands.
Configures A20 line gate status at program start-up time.
Terminates CONFIG.SYS processing prematurely except for certain directives that must still execute.
Sets hash table size to optimize fast file open operations, differing from MS-DOS/PC DOS FASTOPEN driver behavior.
Determines how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads FCBs into upper memory areas instead of conventional memory.
Boot manager control command.
Sets maximum number of files that can be opened concurrently by the system.
Like FILES but allocates file handles in upper memory segments rather than conventional memory.
Includes execution of specified subsections within CONFIG.SYS (refer to IGNORE directive details).

GTemplate:NbndI

Awaits a key press or timeout, returning error level as ASCII code or 1024 if timeout occurs.
Resumes CONFIG.SYS execution at a designated label.
Initiates nested CONFIG.SYS processing at a label, then returns to the prior point.
Refer to , , or for additional details.
Consult .
Consult .
Refer to or for related information.
See or for further guidance.
Consult .
Loads TSR after relocating the DOS data segment; compare with INSTCDEX.
Refer to , , or for more information.
Consult .
Refer to or for further details.
Activates console and command line history buffer along with enhanced pattern matching.
Defines the address of the HMA memory segment.
Configures energy-saving mode using the HLT instruction.
Performs virus scanning on boot sector during startup.
Loads installable file system drivers.
Prevents execution of specified CONFIG.SYS subsections.
Permits selected programs to operate at ring 2, granting direct hardware I/O access.
Incorporates directives from another menu block (emulated via GOSUB/RETURN in DR-DOS).
Sets the status of keyboard Insert mode.
Installs TSR utilities into memory.
Loads TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
Installs TSR after relocating DOS data segment; compare with INSTCDEX.
Adjusts PIC interrupt priorities to assign highest precedence to a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Indicates the address of the relocated keyboard buffer.
Sets the upper limit for accessible drive letters.
Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Specifies directories for DLL search paths.
Handles compatibility settings for legacy applications.
Determines the number of file locks allowed.
Controls boot logo display when using PTS-DOS boot manager.
Configures count, sequence, I/O port address, and timeout duration for LPT1 device.
Applies identical settings as LPT1 for LPT2 device.
Mirrors LPT1 configuration for LPT3 device.
Enables and configures LPT4 device similarly to others.
Establishes wait interval before elevating process priority.
Sets strategy for memory allocation management.
Defines default DOS memory allocation method.
Specifies menu option parameters.
Assigns menu color schemes (simulated via ECHO in DR-DOS).
Sets default menu block (emulated using TIMEOUT and SWITCH commands in DR-DOS).
Defines a menu block (emulated through ECHO and SWITCH in DR-DOS).
Enables support for multitrack disk operations.
Continues CONFIG.SYS processing from another file, optionally loading a device driver and setting %NEWFILE% environment variable.

NTemplate:NbndQ

Sets default No () response character in Yes/No/Resume prompts.
Determines whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled by default.
Executes conditionally based on last error code, e.g. .
Similar to and , displays message and waits for key input.
Requires user confirmation of errors detected in CONFIG.SYS processing.
Configures buffer size parameters for LPT ports.
Executes conditionally on PC-compatible hardware platforms.
Sets priority level for task scheduler operations.
Defines priority settings for disk I/O related programs.
Changes default printer driver among LPT1 through LPT4 devices.
Specifies whether DOS applications are permitted to run.
Loads a user interface shell environment.
Executes conditionally on IBM PS/1-compatible systems.
Executes conditionally on IBM PS/2-compatible systems.
Suppresses output sent to STDOUT display.

RTemplate:NbndT

Enables automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files.
Reserves a specific drive letter, preventing allocation by local block device drivers.
Sets the default character used for Resume () prompts.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH statement, optionally providing a return code.
Defines the amount of real mode memory available.
Allows simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
Determines whether the initial character of deleted files is stored in the FAT reserved region.
Selects video mode under FreeDOS or configures screen access methods for PTS-DOS.
Controls the status of the keyboard’s Scroll Lock key.
Sets environment variables for the system.
Loads the command interpreter shell.
Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, preventing fragmentation when using third-party shells.
Specifies states for keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Defines whether files are closed upon pressing Ctrl+Alt+Del.
Skips the Power-On Self-Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Configure stack sizes for hardware interrupts or threads across various DOS systems and derivatives, with some options ignored on certain versions for compatibility purposes.
, SYSBOOT, SYSGEN, SYSLOAD
Directives specific to PTS-DOS managing boot processes, alternative system file locations, memory layout configurations, and loading from alternate disk areas.
, SWITCH
Enables nested menu structures or conditional CONFIG.SYS processing in DOS variants (excluding DR-DOS and FreeDOS), allowing key-dependent branching within configuration scripts.
, SWAPPATH
OS/2-specific settings designating drives for error logging and paths for swap file storage.
, SWITCHES
Define default command-line switch characters ('/' or '-') and special options mainly applicable to DOS variants other than PTS-DOS where some are disregarded.
, THREADS, TIMESLICE
OS/2-specific parameters controlling fixes for FPU bugs, maximum concurrent threads, and scheduler time slice durations.
, TRACE, TRACEBUF
Manage timeout intervals for CONFIG.SYS prompts and enable single-step execution with logging buffers across DR-DOS, PTS-DOS, FreeDOS, and OS/2 platforms, with varying functionalities per system.
, TRAPDUMP
PTS-DOS parameter that specifies temporary file extensions and an OS/2 option to log detailed error information during crashes or traps.

UTemplate:NbndZ

Configures DOS to utilize a specified segment as Upper Memory Block (UMB) memory.
Sets which UMB server is employed by the system.
Defines address ranges allocated as UMB RAM.
Enables or disables verification of disk write operations.
Specifies the version of DOS reported to software applications.
Configures VGA display status settings.
Indicates current video mode similar to FreeDOS’s SCREEN command.
Determines whether virtual DMA functionality is permitted.
Specifies if the processor’s Virtual Mode Extensions (VME) are disabled.
Sets parameters for VxD drivers used by Windows environments.
Configures system support features for Windows operating systems.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible hardware platforms.
Activates built-in support for Year 2000 compliance.
Defines the default character representing Yes (Y) responses in prompts.
Controls tracking of deleted files.

Issues

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

If the SHELL directive is absent from CONFIG.SYS, or if the file itself 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 if COMMAND.COM cannot be found; however, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt the user to specify a command processor path. This recovery prompt also appears if the main command processor terminates unexpectedly or is deliberately exited, enabling a limited shell replacement during runtime without requiring a reboot.

COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS but often remains in the root of drive C: in dual-boot configurations. DR-DOS versions 7.02 and above prevent bypassing SHELL directives while operating in skip, trace, or step modes to avoid conflicts; if no valid shell is found, it requests a correct shell name before launching COMMAND.COM.

The maximum size allowed for CONFIG.SYS varies depending on the DOS version—MS-DOS and PC DOS limit the file size to a few kilobytes (up to 64 KB in later releases), whereas DR-DOS imposes no practical size restriction because it interprets the file line by line rather than compiling tokens. This approach grants precise control over the loading sequence of drivers and terminate-and-stay-resident programs via DEVICE and INSTALL commands, which can be advantageous for resolving conflicts or incorporating debuggers and temporary utilities into the boot routine.

Early MS-DOS editions restricted the SHELL command line to 31 characters; this limit was later expanded to 128 characters, while DR-DOS supports up to 255 characters. It should be noted that CONFIG.SYS directives do not accommodate long filenames.

Dual booting DOS and Windows 9x

When Windows 95 is installed over an existing DOS or Windows system, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively to enable dual-boot functionality. Booting into DOS temporarily restores these original filenames. Additionally, Windows 95 system files are backed up 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 remain untouched. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its configuration files during startup.

OS/2 / Windows NT

OS/2 heavily relies on CONFIG.SYS for configuring system settings, loading device drivers, and setting environment variables before initiating its graphical user interface.

Within Windows NT’s OS/2 subsystem, CONFIG.SYS appears as a conventional file to OS/2 applications but is actually managed within the system registry.

There exists a range of undocumented CONFIG.SYS directives specific to OS/2.

CONFIG.SYS continues to play a vital role in OS/2 derivatives such as eComStation and ArcaOS.

See also

External links

  • AUTOEXEC.BAT and CONFIG.SYS details | Computer Hope | 2017-12-29 | [1]
  • Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives | Microsoft Support | [2]
  • CONFIG.SYS Command Reference | Caldera (company) | 1998 | [3] (DR-DOS 7 directives)
  • FreeDOS CONFIG.SYS directives description | [4]
  • PTS-DOS 2000 Pro User Manual including CONFIG.SYS commands | [5]
  • Unofficial German-language PTS-DOS FAQ (PTS/FAQD) from 2004 | [6]