LASTDRIVEHIGH (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Computer software |
| Founded | 1983 |
| Products | System configuration for DOS and OS/2 |
CONFIG.SYS serves as the principal configuration file for DOS and OS/2 operating systems. This plain text file, written in ASCII, includes setup instructions that the operating system's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—interprets during system startup. CONFIG.SYS was first introduced with DOS version 2.0.
Usage
The directives within CONFIG.SYS tailor DOS to manage devices, applications, and memory allocation. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL command; if none is specified, it defaults to COMMAND.COM. Subsequently, the shell executes the commands contained in the AUTOEXEC.BAT file.
Primarily, this configuration file consists of name=value pairs that set adjustable parameters or load device drivers and terminate-and-stay-resident (TSR) programs into memory.
In DOS environments, CONFIG.SYS is located in the root directory of the bootable drive.
Certain DOS variants check for alternative configuration filenames instead of CONFIG.SYS:
- Advanced versions of Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, System Manager, and REAL/32 seek CCONFIG.SYS (derived from "Concurrent") rather than CONFIG.SYS. Multiuser DOS may utilize CCONFIG.INI, while REAL/32 looks for MCONFIG.SYS. These platforms also support extra configuration data stored in binary files such as CCONFIG.BIN, which are generally managed through CONFIG.EXE.
- In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, a DCONFIG.SYS file takes precedence over CONFIG.SYS. Originally associated with disk compression utilities, it also facilitates multi-boot setups.
- OpenDOS 7.01 and DR-OpenDOS 7.02 search for ODCONFIG.SYS, whereas certain DR-DOS 7.02+ editions look for DRCONFIG.SYS.
- Starting with DR-DOS 6.0, users can modify default configuration file extensions using SYS /DR:ext, allowing multiple system files to coexist in a single root directory and be selected by boot loaders like LOADER.
- The SHELL command supports specifying alternative AUTOEXEC.BAT files via /P[:filename.ext], with COMMAND.COM accepting extensions other than .BAT in this mode—a feature also available in 4DOS.
- DR-DOS offers a CHAIN=filespec directive to continue reading another configuration file; this can include an optional label parameter (CHAIN=filespec,label) to jump to particular sections within that file.
- From version 7.03 onwards, DR-DOS introduces SYS /A, which copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.
Other DOS-like systems employ similar configuration files: FreeDOS uses FDCONFIG.SYS, RxDOS relies on RXCONFIG.SYS, and PTS-DOS utilizes CONFIG.PTS.
In Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT exist in the boot drive's root directory but are generally left empty. Windows Me does not process CONFIG.SYS during startup; instead, it loads 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 to be loaded during boot.
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 points for , , , , and commands.
- Functions similarly to , allowing inline commentary following other directives. (MS-DOS/PC DOS treats such inline comments differently when enclosed in quotation marks.)
- Introduces inline remarks in conjunction with the ; directive.
- Prompts the user with a Yes/No confirmation before proceeding with subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional logic via boot menus.) DOS versions 6.0 and later offer comparable functionality appended to directives.
- Forces the immediate execution of the next CONFIG.SYS command without conditions.
ATemplate:NbndC
- Determines whether programs may be terminated upon encountering errors.
- Configures drives to record file access dates within FAT file systems.
- Enables conditional execution specifically on AT-compatible hardware.
- Implements a boot manager utility.
- Adjusts the verbosity level of error messages.
- Alters the default serial port driver (COM ports) assigned to the AUX device.
- Restricts character device availability exclusively to the \DEV directory.
- Loads fundamental device drivers directly into memory.
- Produces an audible beep even if sound notifications are disabled system-wide.
- Designates the operating system to boot subsequently.
- Enables or disables extended Ctrl+C interrupt checking.
- Specifies the quantity of disk buffers allocated by the system.
- Similar to BUFFERS but loads these buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , ,
- Manage cache block allocation and timing for flushing operations.
- Loads external programs during CONFIG.SYS processing, pausing execution until they return control.
- Sets the keyboard's Caps Lock state upon startup.
- ,
- Configures CD-ROM driver parameters and buffer sizes.
- Continues processing of CONFIG.SYS directives from another file or label reference.
- , , along with additional PTS-DOS-specific commands, adjust system clock settings, screen clearing behavior, and hardware configurations.
- , , and related instructions enable internationalization support and codepage settings across various DOS implementations.
Other directives regulate hardware parameters such as COM port assignments and CPU types, manage buffer usage, control conditional execution based on processor or system characteristics, and configure devices crucial for enhancing performance across diverse DOS platforms.
DTemplate:NbndF
- Sets relocation options for drive descriptor tables in memory.
- Defines the memory segment address used for multi-sector disk data deblocking processes.
- Activates internal debugger capabilities.
- Provides boot manager functionality.
- Loads device drivers into conventional memory space.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Configures country-specific settings and codepage information for keyboard, screen, and printer devices (KBD, SCR, LPT).
- Adjusts cache memory size parameters.
- Selects floppy disk compatibility modes.
- Specifies font selection for display output.
- Controls loading of DOS into high or upper memory regions (similar to in DRDOS 5.0).
- Loads DOS internal tables such as BUFFERS, FCBS, FILES, LASTDRIVE, and STACKS into upper memory areas.
- Provides an alternate directory path for DOS system files.
- Defines search paths for data files.
- Specifies parameters related to physical disk drives.
- Sets configuration details for unrecognized or unknown drives.
- Refer to for additional information.
- Enables error logging functionality and designates a drive for storing logs (
PDUMP.nnn). - Displays a standard text message on screen during processing.
- Outputs messages that include ANSI escape codes for enhanced formatting.
- Specifies extra checks to perform when starting programs.
- Defines an assumed error or return code for subsequent commands in the configuration file.
- Controls the A20 line gate state when launching programs to manage memory access above 1 MB.
- Terminates processing of CONFIG.SYS before reaching the end of the file (excluding certain SWITCHES and SHELL commands).
- Sets the size of hash tables used to speed up file open operations (differs from MS-DOS/PC DOS FASTOPEN driver implementation).
- Determines how many File Control Blocks (FCBs) can be cached simultaneously (shares buffer space with FILES under DR-DOS).
- Functions like FCBS but explicitly loads FCBs into upper memory areas.
- Provides boot manager capabilities similar to earlier directives.
- Specifies the maximum number of files that can be open concurrently by the system.
- Equivalent to FILES but explicitly loads file handles into upper memory regions.
- Facilitates inclusion and execution of specified subsections within CONFIG.SYS files (see IGNORE directive).
GTemplate:NbndI
- Waits for a key press or until a timeout occurs, setting the error level to the ASCII value 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 previous point.
- Refer to , , or for details.
- See also .
- Consult .
- See or for further information.
- Refer to or as needed.
- Consult .
- Loads a TSR program following relocation of the DOS data segment; compare with INSTCDEX.
- Refer to , , or for more details.
- See .
- Check or for additional context.
- Activates console and command line history buffer with enhanced pattern searching capabilities.
- Defines the address of the HMA segment.
- Configures energy-saving mode via HLT instruction.
- Enables scanning for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specific CONFIG.SYS subsections; see also .
- Permits select programs to execute at ring 2, allowing direct hardware I/O access.
- Incorporates directives from another menu block (simulated through GOSUB/RETURN in DR-DOS).
- Sets the state of the keyboard Insert mode.
- Installs a TSR program into memory.
- Loads TSR into upper memory area (similar to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating DOS data segment; see INSTCDEX for comparison.
- Adjusts PIC interrupt priorities, assigning highest priority to a given IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Specifies the relocated address of the keyboard buffer.
- Sets the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists paths used for DLL searches.
- Manages compatibility settings for legacy applications.
- Determines the number of file locks allowed.
- Controls display of boot logo via PTS-DOS boot manager.
- Configures count, order, I/O address, and timeout parameters for LPT1 device.
- Same configuration as LPT1 but applied to LPT2 device.
- Same as LPT1 settings but targeted at LPT3 device.
- Enables and configures settings for LPT4 device support.
- Sets delay before increasing process priority level.
- Defines memory allocation method used by DOS.
- Specifies default strategy for DOS memory allocation.
- Establishes menu options available in configuration menus.
- Specifies color schemes for menus (can be emulated using ECHO commands in DR-DOS).
- Sets default menu block (emulatable with TIMEOUT and SWITCH in DR-DOS).
- Defines a specific menu block (can be emulated via ECHO and SWITCH in DR-DOS).
- Enables or disables multitrack operations on disks.
- Continues processing CONFIG.SYS from a new file after loading a device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets default character representing No () in Yes/No/Resume prompts.
- Determines whether keyboard [[Num Lock|Template:Keypress]] is active or inactive by default.
- Allows conditional execution based on the last error code, e.g., .
- Displays a message and waits for user key press before continuing.
- Requires user confirmation when errors occur during CONFIG.SYS processing.
- Configures buffer size settings for LPT ports.
- Enables conditional execution on PC-compatible systems only.
- Sets process scheduler priority level.
- Defines disk I/O priority settings.
- Changes default printer device driver among LPT1 to LPT4 ports.
- Specifies whether DOS applications are permitted to run under certain conditions.
- Loads a user interface shell environment.
- Enables conditional execution on IBM PS/1-compatible machines only.
- Enables conditional execution on IBM PS/2-compatible machines only.
- Suppresses output sent to STDOUT display.
RTemplate:NbndT
- Activates automatic system reboot when errors occur.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates a drive letter for local block device drivers.
- Sets the standard Resume () response character in prompts.
- Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command, optionally with a return code.
- Defines the size of real mode memory available.
- Loads multiple programs specified in CONFIG.SYS simultaneously in the background.
- Determines whether the first character of a deleted file is preserved in the FAT reserved area.
- Selects video mode for FreeDOS or screen access methods for PTS-DOS.
- Configures the keyboard's Scroll Lock state to on or off.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but includes a size parameter for pre-allocating memory for COMMAND.COM, optimizing usage especially with third-party shells that cannot load into HMA or UMBs.
- Specifies states of keyboard modifiers such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files are closed upon pressing Ctrl+Alt+Del.
- Indicates if the Power-On Self-Test (POST) should be bypassed during reboot.
- , STACKSIZE, STACKSHIGH
- Configures stack sizes and numbers across different DOS versions, important for interrupt handling and memory management.
- Settings related to boot manager configuration.
- Defines submenu sections (from DOS 6.0 onward), unsupported by DR-DOS or FreeDOS but can be simulated using CLS, ECHO, and SWITCH commands under DR-DOS.
- Directs error logging to a drive instead of popup messages (applicable in OS/2).
- , SWAP-related options
- Specify swap file locations and manage system memory (OS/2).
- , SWITCHES
- Allow conditional execution of CONFIG.SYS based on key input or special options, varying by operating system version.
- Sets default switch characters ('/' or '-') used by system commands across various DOS platforms.
- , SYSBOOT, SYSGEN, SYSLOAD, SYSTEMPOOL, SYSTOUMB
- Various configurations impacting hardware emulation, alternative booting methods, memory allocation, and loading behavior primarily under PTS-DOS or OS/2 systems.
- , TIMESLICE
- Adjusts concurrency settings such as thread counts and scheduler time slices (OS/2).
- , TRACE, TRACEBUF
- Control timeouts during CONFIG.SYS processing and enable trace logging for debugging on DR-DOS, PTS-DOS, and OS/2 platforms.
- , TRAPDUMP
- Defines temporary file extensions (PTS-DOS) and detailed error logging options (OS/2).
UTemplate:NbndZ
- Sets a specific segment for DOS to use as Upper Memory Block (UMB).
- Defines the UMB server configuration.
- Specifies address ranges designated as UMB RAM.
- Enables or disables verification of disk writes.
- Reports a specific DOS version to applications.
- Configures VGA display status settings.
- Specifies the current video mode in use.
- Determines whether virtual DMA is permitted.
- Controls deactivation of the processor’s Virtual Mode Extensions feature.
- Configures VxD driver parameters for Windows environments.
- Sets up system support features for Windows operation.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Allows conditional execution on XT-compatible machines.
- Enables built-in Year 2000 compliance support.
- Defines the default character used for affirmative responses in queries.
- Configures tracking settings for file deletions.
Issues
The system is capable of booting even if CONFIG.SYS is absent or corrupted; however, this file along with AUTOEXEC.BAT is crucial for comprehensive operating system customization and meeting software prerequisites. If these files are damaged, troubleshooting becomes necessary.
When CONFIG.SYS does not contain a SHELL command or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will not boot without this file, whereas MS-DOS 6.0, PC DOS 6.1, Novell DOS 7+, and later versions will prompt the user to specify a command processor path. This recovery prompt also appears if the command interpreter terminates unexpectedly or is exited intentionally, permitting a limited runtime shell replacement without requiring a reboot.
Because of incompatibilities between MS-DOS 7.0+ COMMAND.COM and DR-DOS, DR-DOS versions 7.02 and later prevent skipping SHELL directives in skip/trace/step modes to avoid errors. Instead, users must provide a valid shell filename before COMMAND.COM is loaded from the root directory.
In MS-DOS and PC DOS, CONFIG.SYS size is restricted to a few kilobytes (up to 64 KB in newer releases), while DR-DOS imposes no such limit due to its distinct processing method. MS-DOS compiles CONFIG.SYS into tokenized memory before sorting directives, but DR-DOS interprets it line-by-line, enabling precise control over the loading sequence of drivers and TSRs via DEVICE and INSTALL commands. This approach allows resolving conflicts in load order and supports conditional execution based on hardware detection or error conditions.
The INSTALL directive in DR-DOS additionally permits running non-resident programs integrated within the CONFIG.SYS processing flow, further enhancing system customization capabilities.
In MS-DOS and PC DOS versions 2.0 through 4.01, the length of the SHELL command line was capped at 31 characters; subsequent releases increased this limit to 128 characters, while DR-DOS accepts up to 255 characters. It should be noted that CONFIG.SYS directives do not support long filenames.
Dual booting DOS and Windows 9x
When Windows 95 is installed over an existing DOS or Windows environment, it renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS respectively. This enables dual-boot functionality between Windows 9x and DOS by temporarily restoring these original filenames when booting into DOS mode. Additionally, backups of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.
In contrast, installing Caldera DR-DOS versions 7.02 or 7.03 alongside Windows 95 preserves the original Windows CONFIG.SYS and AUTOEXEC.BAT filenames, while DR-DOS employs DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.
OS/2 / Windows NT
OS/2 depends extensively on CONFIG.SYS for driver configuration and environment setup prior to launching its graphical user interface. Within the OS/2 subsystem of Windows NT, however, these CONFIG.SYS settings are maintained within the system registry instead of traditional file storage.
Numerous CONFIG.SYS directives utilized by OS/2 remain undocumented publicly. The file continues to be employed 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
- AUTOEXEC.BAT and CONFIG.SYS details 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
- Explanation of FreeDOS CONFIG.SYS commands
- PTS-DOS 2000 Pro User Manual including CONFIG.SYS directives (archived)
- Unofficial German PTS-DOS FAQ (2004) with CONFIG.SYS directive information (archived)