HIINSTALLLAST (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the fundamental configuration file for DOS and OS/2 operating systems. This particular ASCII text document holds user-modifiable setup commands that the operating system's DOS BIOS—usually within IBMBIO.COM or IO.SYS—interprets during the startup process. CONFIG.SYS made its debut with DOS version 2.0.
Usage
The directives contained in CONFIG.SYS are responsible for setting up DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL directive; if none is defined, it defaults to COMMAND.COM. Subsequently, this shell runs the commands found in the AUTOEXEC.BAT file.
CONFIG.SYS primarily consists of name=value entries that either adjust configurable parameters or load essential files such as device drivers and terminate-and-stay-resident programs (TSRs).
Within DOS environments, CONFIG.SYS is located in the root directory of the system’s boot drive.
This filename is also utilized by (DCP), an MS-DOS variant created by East-German manufacturer VEB Robotron.
Certain DOS derivatives check for alternative configuration filenames that take precedence over CONFIG.SYS:
- Advanced iterations of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 prefer CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) instead of CONFIG.SYS. REAL/32 may alternatively use MCONFIG.SYS. These operating systems manage extra settings stored in binary files like CCONFIG.BIN, typically handled through CONFIG.EXE.
- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS versions 7.02 and later, DCONFIG.SYS overrides CONFIG.SYS. This approach supports disk compression utilities and multi-boot configurations.
- OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS, while some DR-DOS 7.02+ releases also look for DRCONFIG.SYS.
- From DR DOS 6.0 onward, the SYS /DR:ext command allows users to define custom file extensions for system files, enabling multiple system configurations to coexist in a single root directory. Boot loaders such as LOADER (used in Multiuser DOS and DR-DOS) can select among these variants.
- The SHELL command supports specifying alternate AUTOEXEC.BAT files through /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT in this context—a feature also available in 4DOS.
- Starting with DR-DOS 6.0, the CHAIN=filespec directive enables continued processing of configuration files located outside the root directory; versions 7.02 and newer permit jumping to labeled sections within these files.
- DR-DOS 7.03 and subsequent versions introduced SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT along with other system files.
FreeDOS provides a comparable capability using FDCONFIG.SYS; similarly, RxDOS employs RXCONFIG.SYS; and PTS-DOS uses CONFIG.PTS.
While both CONFIG.SYS and AUTOEXEC.BAT exist in the root directories of Windows 95 and Windows 98 boot drives, they are generally left empty.
Windows Me does not process CONFIG.SYS during startup; instead, it relies on environment variables stored within the Windows Registry at HKLM\System\CurrentControlSet\Control\SessionManager\Environment.
In contrast, under FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded at boot time.
Example
Here is 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>
:;*?!
- Utilized to define labels within CONFIG.SYS, serving as jump targets for , , , and commands.
- Functions similarly to , also employed for inline comments following other CONFIG.SYS statements. (Note that in MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Introduces inline comments, supplementing the ; directive.
- Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS supports conditional execution with boot menus but lacks optional messages.) From DOS 6.0 onward, this feature can be implemented by appending after directives, e.g., .
- Forces unconditional execution of the next CONFIG.SYS command.
ATemplate:NbndC
- Determines whether programs can be aborted upon encountering errors.
- Sets which drives will record file access timestamps in FAT file systems.
- Enables conditional execution on AT-compatible hardware.
- Boot management utility.
- Adjusts verbosity level of error messages.
- Changes the default serial port driver assignment (COM1: through COM4:) for the AUX device.
- Restricts character device availability outside of the virtual \DEV directory.
- Loads a base device driver into system memory.
- Produces a beep sound even if audible alerts are disabled.
- Defines which operating system to boot next.
- Enables or disables extended Ctrl+C interrupt checking.
- Specifies the count of disk buffers to allocate.
- Explicitly loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- Sets maximum number of dynamically allocated cache blocks.
- Defines maximum idle time before unused cache blocks are returned to the system pool.
- Specifies maximum time before dirty cache blocks are flushed to disk storage.
- Loads programs within CONFIG.SYS, running them in the foreground and halting further processing until completion.
- Sets Caps Lock key status on or off at startup.
- Defines the CD-ROM hardware driver filename.
- Number of buffers allocated for CD-ROM access operations.
- Continues processing CONFIG.SYS from a new file or label (introduced in DR-DOS 7.02).
- Specifies the type of system clock used.
- Clears the console screen display.
- Defines OEM codepage(s) for character encoding.
- Sets CMOS RAM memory address location.
- Configures colors for boot menu display.
- , ;, ;, ;
- Set parameters such as count, logical sequence, I/O address, and timeout values for COM ports.
- Defines DMA buffer settings.
- Redefines characters that introduce inline comments or causes line ignoring behavior.
- Activates and configures internationalization support features.
- Positions cursor on screen for configuration menus.
- Supports switching between codepages dynamically.
- Specifies RAM refresh rate.
Conditional execution directives correspond to CPU models (CPU88, CPU86, CPU286, CPU386, CPU486), with plus variations (+) indicating support for higher-level CPUs. These are mainly utilized within PTS-DOS and DR-DOS systems for hardware-specific tuning and optimizations.
DTemplate:NbndF
- Controls relocation of drive descriptor tables in memory.
- Assigns memory segment address used for multi-sector disk data deblocking processes.
- Enables built-in debugger functionality.
- Boot management utility command.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country-specific and codepage information for keyboard, screen, and printer devices.
- Sets sizes for cache memory allocations.
- Specifies compatibility mode settings for floppy disk drives.
- Determines font used on display output devices.
- Controls loading of DOS into high memory and usage of upper memory areas (similar to in DRDOS 5.0).
- Loads DOS internal tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) into upper memory regions.
- Provides an alternative search path for locating DOS files.
- Defines search paths for data files used by DOS utilities and drivers.
- Specifies physical parameters associated with disk drive hardware configurations.
- Sets parameters applicable to unrecognized or unknown drives by the system.
- See .
- Allows specification of drive letters for
PDUMP.nnnerror log files. - Outputs a message on screen during processing.
- Displays messages containing ANSI escape sequences for enhanced formatting.
- Enables additional validation checks when executing programs from CONFIG.SYS or AUTOEXEC.BAT.
- Defines assumed error or return codes for subsequent commands executed by DOS shell or batch files.
- Controls A20 gate state during program startup sequences to manage memory addressing above 1MB boundary.
- Terminates CONFIG.SYS processing prematurely except for certain essential directives that must still run afterward.
- Sets size of hash tables used to speed up file open operations—differs from MS-DOS FASTOPEN driver implementation.
- Specifies number of cached File Control Blocks (FCBs) allowed open simultaneously (shares buffer space with FILES under DR-DOS).
- Similar to FCBS but explicitly loads FCBs into upper memory regions to free conventional memory space.
- Boot management utility command variant.
- Defines maximum number of files allowed open concurrently by DOS applications and utilities.
- Equivalent to FILES but explicitly loads file handle structures into upper memory blocks to conserve conventional memory usage.
- Includes specified subsections of CONFIG.SYS during processing (refer to IGNORE directive).
GTemplate:NbndI
- Waits for a keystroke 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 processing at a specified label, then returns to the previous point.
- Refer to , , or for additional details.
- Consult for further information.
- See for related instructions.
- Refer to or as applicable.
- See or for more context.
- Consult for usage guidance.
- Loads TSR programs after relocating the DOS data segment, functioning similarly to .
- See , , or for related commands.
- Consult for further reference.
- Refer to or for additional options.
- Activates console and command line history buffers with enhanced pattern search capabilities.
- Defines the High Memory Area (HMA) segment address.
- Configures energy-saving mode using the HLT instruction.
- Performs boot sector virus detection during startup.
- Loads file systems that are installable.
- Prevents execution of specified subsections within CONFIG.SYS.
- Permits certain programs to operate at ring 2, allowing direct hardware I/O access.
- Includes directives from another menu block, emulated via GOSUB/RETURN in DR-DOS environments.
- Sets the keyboard Insert mode status.
- Installs TSR utilities into memory.
- Loads TSR utilities into upper memory, equivalent to HIINSTALL in DR DOS version 5.0.
- Installs TSR programs following relocation of the DOS data segment.
- Adjusts PIC interrupt priorities to give precedence to a designated IRQ number.
KTemplate:NbndM
- Defines keyboard layout configuration.
- Specifies an alternate address for the relocated keyboard buffer.
- Sets the maximum number of accessible drives.
- Functions like LASTDRIVE but loads Current Directory Structure into upper memory instead.
- Lists paths used for DLL searches.
- Handles legacy program compatibility settings.
- Determines the number of file locks allowed.
- Configures support for boot logos and startup message displays.
- Sets parameters including count, order, I/O address, and timeout duration for the LPT1 device.
- Applies LPT1 settings equivalently to LPT2 device configuration.
- Mirrors LPT1 device settings for LPT3 device configuration.
- Enables and configures LPT4 device similarly to previous LPT devices.
- Establishes wait time before elevating process priority levels.
- Manages strategies for memory allocation within DOS.
- Specifies default DOS memory allocation parameters.
- Defines available menu options in the system interface.
- Sets color schemes for menus, with emulation support in DR-DOS systems.
- Specifies which menu block is loaded by default, emulatable in DR-DOS environments.
- Defines individual menu blocks, with emulation capabilities under DR-DOS.
- Enables or disables multitrack disk operation functionality.
- Continues CONFIG.SYS processing using a different file after loading selected drivers and establishing environment variables.
NTemplate:NbndQ
- Sets the default character representing "No" () in Yes/No/Resume prompts.
- Controls whether keyboard [[Num Lock|Template:Keypress]] is enabled or disabled at startup.
- Executes commands conditionally based on the last error code encountered, such as .
- Displays a message and waits for a key press, similar in function to and under DR-DOS systems.
- Requires user confirmation when errors occur within CONFIG.SYS processing.
- Configures buffer sizes allocated to LPT ports.
- Executes commands conditionally on PC-compatible hardware only.
- Sets scheduling priority levels for processes.
- Adjusts priority settings specifically for disk I/O related programs.
- Changes the default printer driver device (e.g., switching from LPT1 to LPT3 or LPT4).
- Specifies whether DOS applications are permitted to run under current configuration.
- Loads a user interface shell environment upon startup.
- Executes commands conditionally on IBM PS/1-compatible machines only.
- Executes commands conditionally on IBM PS/2-compatible machines only.
- Suppresses display output sent to STDOUT.
RTemplate:NbndT
- Enables automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters reserved by local block device drivers.
- Sets the default Resume () response character for Yes/No/Resume prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH point, optionally providing a return code.
- Specifies the size of real mode memory.
- Allows simultaneous loading of programs in CONFIG.SYS in the background, functioning similarly to INSTALL under DOS.
- Determines storage of the first character of deleted files within the FAT reserved area.
- Defines video mode settings (FreeDOS) or methods for screen access (PTS-DOS).
- Controls keyboard Scroll Lock state, turning it on or off.
- Sets environment variables for the system.
- Loads the command interpreter shell.
- Functions like SHELL but permits specifying a pre-allocated size for COMMAND.COM to load into HMA or UMBs, enhancing memory management with third-party shells.
- Defines keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close automatically on Ctrl+Alt+Del command.
- Skips the Power-On Self Test (POST) during reboot sequences.
- Sets the quantity of stacks allocated for hardware interrupts.
- Defines default stack size assigned to new threads.
- Similar to STACKS but loads buffers into upper memory regions.
- Configuration settings for boot manager operations.
- Reserved for internal system use.
- Manages operation of the XMS A20 gate.
- Defines submenu block structures (emulatable under DR-DOS).
- Logs error information to disk instead of displaying popup alerts.
- Specifies the directory path for swap files.
- Enables conditional continuation of nested CONFIG.SYS processing at designated labels based on key input, with RETURN reverting to the previous location.
- Sets the default switch character, either '/' or '-'.
- Defines special option parameters.
- Activates a correction for floating-point unit (FPU) rounding errors.
- Specifies an alternative filename for DOS system boot files.
- Configures memory locations where DOS components reside.
- Loads the system from an alternate disk sector or area.
- Determines size of dynamic system memory pool allocation.
- Loads DOS data and code into upper memory blocks (UMBs).
- Specifies the number of threads allowed to run concurrently.
- Sets timeout durations for CONFIG.SYS single-step execution as well as default responses for prompts such as Yes/No and SWITCH selections.
- Configures minimum and maximum time slices used by the scheduler.
- Defines file extensions used for temporary files.
- Globally or locally enables/disables single-stepping execution of CONFIG.SYS (and AUTOEXEC.BAT); note that OS/2's implementation differs significantly from DOS variants.
- Sets the buffer size used by TRACE logging functionality.
- Records detailed error logs to assist with diagnostics.
UTemplate:NbndZ
- Directs DOS management to utilize a specific memory segment as UMB (Upper Memory Block) space.
- Configures which UMB server is employed by the system.
- Specifies address ranges allocated as UMB RAM areas.
- Enables or disables verification of disk write operations.
- Defines which DOS version is reported to running applications.
- Manages VGA display status settings.
- Specifies the active video mode in use.
- Indicates whether virtual DMA capabilities are permitted.
- Enables or disables processor Virtual Mode Extensions features.
- Configures Virtual Device Driver (VxD) support for Windows environments.
- Sets up system compatibility and support parameters for Windows operation.
- Adjusts relocation settings for Extended BIOS Data Area (XBDA).
- Allows conditional execution when running on XT-compatible machines.
- Configures integrated Year 2000 compliance support mechanisms.
- Specifies default 'Yes' character used in prompt responses.
- Manages tracking of file deletion activities.
Challenges
The system is capable of booting even if CONFIG.SYS is absent or damaged; however, this file along with AUTOEXEC.BAT is crucial for comprehensive DOS startup customization and meeting software prerequisites. When these files are compromised, diagnostic measures become necessary.
In cases where CONFIG.SYS does not include a SHELL command or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to 6.0 will not boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 or later versions prompt users to provide the path to a command processor. This recovery prompt also appears if the main command interpreter terminates or exits intentionally, enabling a limited runtime shell replacement without requiring a system reboot.
COMMAND.COM from MS-DOS 7.0 and onward is incompatible with DR-DOS, which frequently operates in dual-boot environments. As a result, DR-DOS versions 7.02 and newer enforce SHELL directives during skip, trace, or step modes to avoid bypassing them. Some subsequent releases reintroduced restricted skip functionality to recover from invalid SHELL parameters. If no valid shell is identified when skipping CONFIG.SYS processing, users must input a valid shell filename before COMMAND.COM loads from the root directory.
The maximum size of CONFIG.SYS varies depending on the operating system version—MS-DOS and PC DOS limit it to several kilobytes (up to 64 KB), whereas DR-DOS imposes no effective size restriction due to its line-by-line parsing method. This design grants enhanced control over the sequence in which drivers and TSRs load via DEVICE and INSTALL, assisting in resolving conflicts and streamlining debugging processes. The INSTALL directive further allows incorporation of non-resident software within the CONFIG.SYS sequence, expanding customization capabilities.
Earlier MS-DOS editions restricted the length of the SHELL command line to 31 characters, which was later increased to 128 characters; DR-DOS supports up to 255 characters. Directives within CONFIG.SYS do not accommodate long filenames.
Dual Booting DOS with Windows 9x
When Windows 95 is installed over an existing DOS/Windows configuration, the original CONFIG.SYS and AUTOEXEC.BAT files are renamed to CONFIG.DOS and AUTOEXEC.DOS respectively, enabling dual boot functionality between Windows 9x and DOS. During a DOS boot, these files are temporarily restored as CONFIG.SYS and AUTOEXEC.BAT. The Windows 95 versions are backed up as CONFIG.W40 and AUTOEXEC.W40.
If Caldera DR-DOS 7.02 or 7.03 is installed alongside Windows 95, Windows retains its CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS uses DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS for setting up drivers and environment variables before launching its graphical user interface.
Within the OS/2 subsystem of Windows NT, configuration settings for OS/2 applications that would traditionally reside in CONFIG.SYS are instead stored within the system registry rather than as physical files.
A variety of undocumented CONFIG.SYS commands exist within OS/2.
CONFIG.SYS continues to be utilized by OS/2 derivatives such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- Information on AUTOEXEC.BAT and CONFIG.SYS available at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS commands (archived)
- Caldera’s CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Details regarding FreeDOS CONFIG.SYS commands
- User guide for PTS-DOS 2000 Pro including CONFIG.SYS command descriptions
- German-language unofficial PTS-DOS FAQ (archived) – supplementary CONFIG.SYS directives