Thursday 14 April 2016

CONFIG.SYS

CONFIG.SYS is the primary configuration file for the MS-DOS and OS/2 operating
systems. It is a special file that contains setup or configuration instructions for the computer system.
The commands in this file configure DOS for use with devices and applications in the system. The
commands also set up the memory managers in the system. After processing the CONFIG.SYS file,
DOS proceeds to load and execute the command shell specified in the shell= line of CONFIG.SYS,
or COMMAND.COM if there is no such line. The command shell in turn is responsible for
processing the AUTOEXEC.BAT file.

The system can still boot if these files are missing or corrupted. However, these two files are
essential for the complete bootup process to occur with the DOS operating system. They contain
information that is used to change the operating system for personal use. They also contain the
requirements of different software application packages. A DOS system would require
troubleshooting if either of these files became damaged or corrupted.

CONFIG.SYS is composed mostly of name=value statements which look like variable
assignments. In fact these will either define some tunable parameters often resulting in reservation
of memory, or load files, mostly TSRs and device drivers, into memory.

In DOS, CONFIG.SYS is located in the root directory of the drive from which DOS was
booted. In some versions of DOS it may have an alternate filename, e.g. FDCONFIG.SYS in
FreeDOS, or DCONFIG.SYS in some versions of DR-DOS.

Both CONFIG.SYS and AUTOEXEC.BAT can still be found included in the system files of
the later Microsoft Windows operating systems. Usually these files are empty files, with no content.
OS/2 did not use the autoexec.bat file, instead using startup.cmd.

In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs
was actually stored in the registry.

Example CONFIG.SYS file for DOS
device = c:\dos\himem.sys
device = c:\dos\emm386.exe umb
dos = high,umb
devicehigh = c:\windows\mouse.sys
devicehigh = c:\dos\setver.exe
devicehigh = c:\dos\smartdrv.exe
country = 044,437,c:\dos\country.sys
shell = c:\dos\command.com c:\dos /e:512 /p

Windows NT

On Windows NT and its derivatives, Windows 2000 and Windows XP, the equivalent file is
called AUTOEXEC.NT and is located in the %SystemRoot%\system32 directory. The file is not
used during the operating system boot process; it is executed when the MS-DOS environment is
started, which occurs when an MS-DOS application is loaded.

The AUTOEXEC.BAT file may often be found on Windows NT, in the root directory of the
boot drive. Windows only considers the "SET" statements which it contains, in order to define
environment variables global to all users. Setting environment variables through this file may be
interesting if for example MS-DOS is also booted from this drive (this requires that the drive be
FAT) or to keep the variables across a reinstall. This is an exotic usage today so this file remains
almost always empty. The TweakUI applet from the PowerToys collection allows to control this
feature (Parse Autoexec.bat at logon).

No comments:

Post a Comment

Popular Posts