Jump to content

HIDEVICE (CONFIG.SYS directive)

From Alfawiki
CONFIG.SYS
Company typeConfiguration file
IndustryComputer software
Founded1983
ProductsConfiguration file 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 are interpreted by the OS's DOS BIOS—commonly found in IBMBIO.COM or IO.SYS—during system startup. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS tailor DOS settings for hardware devices, software applications, and memory handling. Once CONFIG.SYS has been processed, DOS initiates the command interpreter defined by the SHELL directive; if none is specified, it defaults to COMMAND.COM, which subsequently executes AUTOEXEC.BAT.

This file primarily contains name=value pairs that specify configurable options or load device drivers and terminate-and-stay-resident (TSR) utilities into memory. CONFIG.SYS is located in the root directory of the boot drive.

The name CONFIG.SYS is also utilized by (DCP), an MS-DOS variant developed by East-German manufacturer VEB Robotron.

Certain DOS distributions check for alternative configuration filenames that take precedence over CONFIG.SYS:

Earlier releases of Concurrent DOS 3.2 through 4.1 did not support CONFIG.SYS; however, subsequent editions such as Concurrent DOS 386 and Multiuser DOS employ CCONFIG.SYS instead. Some versions of Multiuser DOS use CCONFIG.INI, whereas REAL/32 looks for MCONFIG.SYS. These platforms often maintain extra settings in binary files like CCONFIG.BIN, which are generally modified using CONFIG.EXE.

In DR DOS 3.31, PalmDOS 1.0, Novell DOS 7, and DR-DOS versions 7.02 and later, DCONFIG.SYS supersedes CONFIG.SYS to support disk compression and multi-boot arrangements. OpenDOS 7.01 and DR-OpenDOS 7.02 also examine filenames such as ODCONFIG.SYS or DRCONFIG.SYS.

Starting with DR DOS 6.0, the command SYS /DR:ext enables customization of system file extensions, allowing several boot configurations to coexist in one root directory and be selected via boot managers like LOADER. The SHELL directive accepts an alternative AUTOEXEC.BAT filename through /P[:filename.ext], which is recognized by COMMAND.COM and compatible shells including 4DOS. Additionally, the CHAIN=filespec command permits continuation of configuration loading from another file, with optional label targeting in DR-DOS 7.02 and newer.

From DR-DOS 7.03 onward, the SYS /A option copies CONFIG.SYS and AUTOEXEC.BAT alongside system files.

FreeDOS utilizes FDCONFIG.SYS, while RxDOS version 7.24 and above employs RXCONFIG.SYS; PTS-DOS uses CONFIG.PTS.

Both CONFIG.SYS and AUTOEXEC.BAT appear in the root directories of Windows 95 and Windows 98, although they are frequently empty since these operating systems are based on DOS.

Unlike its predecessors, 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 context of FlexOS, CONFIG.SYS is a binary configuration file that specifies resource managers and device drivers loaded during system initialization.

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>

:;*?!

Marks labels in CONFIG.SYS to serve as jump targets for , , , , and commands.
Functions like , but is additionally utilized for inline comments following other CONFIG.SYS instructions. (In MS-DOS/PC DOS, inline comments inside double quotes are not ignored.)
Used to introduce inline comments alongside the ; directive.
Prompts a Yes/No confirmation before executing subsequent CONFIG.SYS commands. (FreeDOS does not support custom messages but allows conditional execution with boot menus.) DOS 6.0 and later versions provide a comparable feature by appending after directives, also supported by DR DOS.
Forces unconditional execution of the next CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be interrupted upon errors.
Sets which drives record file access timestamps in FAT file systems.
Enables conditional execution on AT-compatible hardware.
Boot manager utility.
Adjusts the verbosity level of error messages.
Changes the default serial port driver (COM1 through COM4) used for the AUX device.
Prevents character devices from being accessible outside the phantom \DEV directory.
Loads a base device driver directly into memory.
Produces a brief beep even if audible alerts are disabled.
Specifies which operating system to boot next.
Enables or disables extended Ctrl+C checking.
Defines the number of disk buffers to allocate.
Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
Sets the maximum cache blocks allocated from the system pool.
Defines maximum time before unused cache blocks return to system pool.
Specifies maximum time before dirty cache blocks are flushed to disk.
Loads and runs programs within CONFIG.SYS in the foreground, halting further processing until completion.
Sets Caps Lock keyboard status on or off.
Defines the name of the CD-ROM hardware driver.
Specifies quantity of buffers for CD-ROM access.
Continues CONFIG.SYS processing using a new file, optionally starting at a specified label.
Defines the type of system clock used.
Clears the display screen.
Specifies OEM codepage(s).
Sets CMOS RAM address location.
Defines color schemes for boot menus.
, ;, ;, ;

Each sets count, logical order, I/O address, and timeout parameters for respective COM ports (DR-DOS 7.02+).

(PTS-DOS)
Designates buffer for DMA operations.

Reassigns lead-in characters for inline comments or causes the following line to be ignored (DOS 4.0+, RxDOS). Ignored in DR-DOS 7.02+, Embedded DOS, PTS-DOS environments.

Enables and configures international language support (DOS 3.0+, DOS Plus, DR DOS, OS/2).

Positions cursor on display for configuration menus (DR-DOS 6.0+).

Supports codepage switching (MS-DOS versions 4.00-4.01 only). Conditional execution directives include CPU-specific flags such as CPU88, CPU86, CPU286, CPU386, CPU486 with plus variants indicating equal or higher CPU models (PTS-DOS, DR-DOS).

DTemplate:NbndF

Configures relocation settings for drive descriptor tables.
Sets memory segment address for multi-sector disk data deblocking operations.
Activates internal debugger support features.
Boot manager utility.
Loads device drivers into memory space.
Loads device drivers into upper memory area (equivalent to in DRDOS 5.0).
Configures country and codepage information for keyboard, screen, and printer devices.
Adjusts sizes of cache memory allocations.
Specifies compatibility mode for floppy disk drives.
Selects display font type.
Controls loading of DOS into high memory and utilization of upper memory areas.
Loads DOS tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory blocks.
Specifies an alternate directory path for DOS files.
Defines search paths for data files.
Sets physical parameters for disk drives.
Configures settings for unrecognized drives.
See .
Enables PDUMP.nnn error logging and designates target drive.
Displays a message on screen during startup or configuration.
Displays a message including ANSI escape sequences for enhanced formatting.
Specifies additional verification checks when launching programs.
Defines assumed error or return codes during subsequent processing steps.
Controls A20 gate status at program start-up time.
Terminates CONFIG.SYS processing prematurely (exceptions may apply).
Adjusts hash table size to speed up file opening operations—differs from MS-DOS FASTOPEN driver functionality.
Sets maximum number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES under DR-DOS).
Similar to FCBS but loads FCBs into upper memory areas.
Boot manager utility again referenced here.
Defines maximum number of files that can be opened concurrently.
Same as FILES but loads file handles into upper memory segments.
Includes execution of specified CONFIG.SYS subsections (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 a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for additional information.
Consult for further details.
See for more context.
Refer to or as applicable.
See or for related commands.
Consult for further guidance.
Loads a TSR program into memory after DOS relocates its data segment. Compare with INSTCDEX.
Refer to , , or for related functions.
See for additional context.
Consult or as needed.
Activates and configures the command line and console history buffer with advanced pattern searching capabilities.
Defines the address of the High Memory Area (HMA) segment.
Sets parameters for HLT instruction power-saving mode.
Specifies system checks for boot sector viruses during startup.
Loads installable file system drivers.
Prevents execution of certain CONFIG.SYS subsections.
Permits specific programs to operate at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the keyboard Insert mode status (on/off).
Loads a TSR program into memory.
Installs TSR software into upper memory areas (equivalent to HIINSTALL in DR DOS 5.0).
Loads TSR programs after DOS relocates its data segment (see also INSTCDEX).
Adjusts PIC interrupt priorities, assigning highest priority to a chosen IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the relocated keyboard buffer address.
Sets the maximum number of accessible drives.
Similar to LASTDRIVE but loads Current Directory Structure (CDS) into upper memory regions.
Lists directories searched for DLL files.
Manages backward compatibility for legacy applications.
Defines the number of file locks allowed.
Configures boot logo display and startup messages with PTS-DOS boot manager support.
Specifies count, logical order, I/O address, and timeout settings for LPT1 device.
Configures LPT2 device with similar parameters.
Sets up LPT3 device accordingly.
Enables and configures LPT4 device settings.
Determines wait time before prioritizing a pending process.
Configures memory allocation methods and strategies.
Specifies DOS memory allocation approach.
Defines menu options available in system boot menus.
Sets color schemes for menus, which can be emulated using ECHO in DR-DOS environments.
Establishes default menu blocks, emulatable through TIMEOUT and SWITCH commands in DR-DOS.
Defines individual menu blocks, emulated via ECHO and SWITCH in DR-DOS systems.
Enables or disables multitrack disk operations functionality.
Continues CONFIG.SYS processing from a different file, optionally loading a device driver and setting the %NEWFILE% environment variable.

NTemplate:NbndQ

Defines the default No () character response in Yes/No/Resume prompts.
Sets keyboard [[Num Lock|Template:Keypress]] state to on or off by default.
Enables conditional execution based on the last error code, e.g., .
Displays text and waits for keypress, similar to and commands in DR-DOS systems.
Requires user acknowledgment of errors encountered during CONFIG.SYS processing.
Configures buffer sizes for printers on LPT1 through LPT3 ports.
Enables conditional execution on PC-compatible hardware platforms.
Sets scheduler priority levels for processes.
Assigns priority levels specifically for disk I/O-related programs.
Changes the default printer device driver among LPT1 through LPT4 ports.
Specifies whether DOS applications are permitted to execute.
Loads a user interface shell program during startup.
Enables conditional execution on IBM PS/1-compatible machines only.
Enables conditional execution on IBM PS/2-compatible machines exclusively.
Suppresses output sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS files (not processed by PTS-DOS).
Allocates drive letters for local block device drivers.
Sets the default character used for the Resume () prompt.
Returns control from nested CONFIG.SYS processing to the previous GOSUB or SWITCH command location, optionally passing a return code.
Defines the size of real mode memory available.
Allows simultaneous loading of programs in the background during CONFIG.SYS execution.
Stores the initial character of deleted filenames within the FAT reserved area.
Configures video mode settings (FreeDOS) or screen access methods (PTS-DOS).
Adjusts keyboard Scroll Lock status to on or off.
Sets environment variables for the system.
Loads the command shell interpreter.
Similar to SHELL but supports pre-allocating memory size to relocate COMMAND.COM into HMA or UMBs, improving memory efficiency with third-party shells.
Defines keyboard modifier key states such as Shift Lock, Num Lock, and Scroll Lock.
Determines whether files close upon pressing Ctrl+Alt+Del.
Bypasses POST sequence during reboot operations.
, STACKSIZE, STACKSHIGH
Configure hardware interrupt stack sizes across various DOS versions, with some parameters ignored in newer DR-DOS iterations.
, SYSBOOT, SYSGEN, SYSLOAD, SYSTOUMB
Directives specific to PTS-DOS that manage boot procedures, system loading locations, and memory optimization strategies.
(DOS 6.0+) Defines submenu blocks not natively supported by DR-DOS or FreeDOS but can be emulated using alternate commands.
, SWAPPATH, THREADS, TIMESLICE
OS/2-specific parameters controlling error logging paths, swap file locations, thread concurrency, and scheduler time slices.
, SWITCHES
Enables conditional processing of CONFIG.SYS based on key inputs (DR DOS) and special options (Novell DOS), with some directives disregarded by PTS-DOS.
, STRING
Establishes the default switch character for the system ('/' or '-') along with internal legacy strings for system use.
, TRAPDUMP
OS/2 options designed for handling FPU bug fixes and detailed error logging mechanisms.
, TRACE
Controls CONFIG.SYS timeout durations and enables single-step execution globally or locally across DR-DOS, PTS-DOS, FreeDOS, and OS/2 variants.
, STORAGE
PTS-DOS directives managing temporary file extensions and boot-related configurations.

This concise summary outlines vital configuration commands essential for tailoring system behavior across various DOS distributions and OS/2 platforms, highlighting their significance in enhancing performance and ensuring compatibility within enterprise IT infrastructures.

UTemplate:NbndZ

Designates a specific memory segment for use as Upper Memory Block (UMB) space in DOS.
Configures the UMB server settings.
Specifies address ranges allocated to UMB RAM areas.
Enables or disables verification of disk write operations.
Defines the DOS version reported by the system.
Sets VGA display status parameters.
Determines the active video mode configuration.
Enables utilization of virtual DMA capabilities.
Controls processor Virtual Mode Extensions settings.
Manages Windows Virtual Device Drivers (VxDs) configurations.
Handles Windows system support features and parameters.
Relocates the Extended BIOS Data Area (EBDA).
Executes commands conditionally on XT-compatible hardware platforms.
Configures support mechanisms for Year 2000 compliance.
Sets the default character used for Yes responses in prompts.
Tracks information about deleted device drivers within the system.

Challenges

Although the system can initiate startup without CONFIG.SYS or AUTOEXEC.BAT, these configuration files are crucial for comprehensive operating system customization and fulfilling application demands. Issues arise when these files become damaged or corrupted, requiring diagnostic efforts.

In cases where CONFIG.SYS does not include a SHELL directive or is missing/corrupted, DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions of DOS prior to 6.0 will not boot if COMMAND.COM is absent, whereas MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later versions prompt the user to provide the path to a command processor. This prompt also occurs if the primary command interpreter terminates or exits deliberately, offering an opportunity to replace the shell temporarily during runtime without rebooting.

COMMAND.COM from MS-DOS 7.0 and above is incompatible with DR-DOS, which frequently resides on drive C: in dual-boot configurations. As a result, DR-DOS versions 7.02 and later enforce the presence of SHELL directives during skip/trace/step debugging modes, preventing their circumvention. Certain updates have reinstated skip functionality to facilitate recovery from invalid SHELL parameters by requesting a valid shell filename before loading COMMAND.COM.

The size limits for CONFIG.SYS files differ between systems: MS-DOS and PC DOS restrict them to a few kilobytes (up to 64 KB in later editions), whereas DR-DOS imposes no size restriction aside from file system limits. MS-DOS processes CONFIG.SYS by compiling it into a tokenized structure held in memory, executing directives sequentially (loading device drivers prior to TSRs). Conversely, DR-DOS parses directives line-by-line, enabling precise control over the loading order of drivers and TSRs through DEVICE and INSTALL commands. This approach resolves conflicts and allows conditional execution based on hardware detection or error conditions, supporting non-resident software integrated into the CONFIG.SYS processing flow.

Earlier MS-DOS and PC DOS versions limited the length of the SHELL command line to 31 characters; subsequent releases extended this limit up to 128 characters, while DR-DOS supports up to 255 characters. It is important to note that CONFIG.SYS directives do not accommodate long filenames.

Dual Booting DOS with Windows 9x

During installation of Windows 95 over a pre-existing DOS or Windows environment, CONFIG.SYS and AUTOEXEC.BAT are renamed as CONFIG.DOS and AUTOEXEC.DOS respectively. This renaming facilitates dual booting between Windows 9x and DOS by temporarily restoring these files to their original names when booting into DOS mode. Additionally, backup copies of the Windows 95 versions are saved as CONFIG.W40 and AUTOEXEC.W40.

When Caldera DR-DOS versions 7.02 or 7.03 coexist with Windows 95, the original Windows CONFIG.SYS and AUTOEXEC.BAT remain intact. Instead, DR-DOS utilizes DCONFIG.SYS and AUTODOS7.BAT as its startup configuration files.

OS/2 and Windows NT

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

Within the OS/2 subsystem of Windows NT, CONFIG.SYS configurations for OS/2 applications are maintained in the registry rather than as conventional configuration files.

A variety of undocumented CONFIG.SYS directives exist specifically for OS/2.

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

See also

External links

  • Detailed AUTOEXEC.BAT and CONFIG.SYS guidance 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 directives (archived)
  • PTS-DOS 2000 Pro User Guide featuring CONFIG.SYS commands (archived)
  • German-language unofficial PTS-DOS FAQ (archived) – comprehensive CONFIG.SYS directives