CONFIG.SYS - Examples

Examples

Example CONFIG.SYS for MS-DOS 5 or higher:

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
  • The first line causes DOS to use the high memory area and upper memory when possible, freeing up more conventional memory for applications to use.
  • The second line loads the HIMEM.SYS driver that enables DOS to use the high memory area.
  • The third line loads the EMM386 memory manager, which emulates expanded memory. The command line argument RAM allows the use of the upper memory area. Another argument that can be given to EMM386.EXE is NOEMS, which allows use of the upper memory area without emulating expanded memory. The NOEMS switch also frees up more upper memory blocks.
  • The fourth line loads the ANSI.SYS device driver into the upper memory area.
  • The fifth lines sets the maximum numbers of files that can be opened to 30.
  • The last line sets the shell to the default shell, COMMAND.COM, and starts it with C:\DOS as the working directory, with an environment size of 512 bytes, and the /P indicates that it is the primary process and therefore cannot be shut down by using the EXIT command.

As of MS-DOS version 6.0, an optional DOS boot menu was configurable. With this, the user could configure any number of boot configurations and choose one on start-up. This was of great use because various DOS applications preferred different settings for optimal functionality.

Example CONFIG.SYS with MS-DOS 6.0 boot menu:

MENUITEM=WIN, Windows MENUITEM=XMS, DOS with only Extended Memory MENUDEFAULT=WIN, 10 DOS=HIGH,UMB DEVICE=C:\DOS\HIMEM.SYS SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\ANSI.SYS DEVICE=C:\DOS\EMM386.EXE NOEMS

The layout of the DOS boot menu is fairly self-explanatory. The section defines menu entries. The option, MENUDEFAULT, allows a default choice with a countdown timer before it starts up (10 seconds here). The area holds lines that will start for every menu choice, while the later and areas are specific to each configuration.

The later boot file, AUTOEXEC.BAT, would receive the chosen selection through a special %CONFIG% environment variable and thereby could branch into separately configured areas within this batch file as well.

More features of CONFIG.SYS menu are described here:

http://dos.rsvs.net/DOSPAGE/CONFMENU.HTM

In general, .SYS-type files are loaded in CONFIG.SYS, as above, and .EXE programs such as the version of the caching software SMARTDRIVE provided by Microsoft with MS-DOS 6.x, or LBACACHE of FreeDOS, are loaded in the AUTOEXEC.BAT file. However, there are ways to load device drivers dynamically from the command line (with DEVLOAD or DYNALOAD) as well as program files during CONFIG.SYS processing (with INSTALL, INSTALLHIGH, or HIINSTALL directives).

Read more about this topic:  CONFIG.SYS

Famous quotes containing the word examples:

    Histories are more full of examples of the fidelity of dogs than of friends.
    Alexander Pope (1688–1744)

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)