Menu

Home
Products
Fantasy Artists
Everything Else...
PC Help
Links
 


 

PC Help

 DOS

Overview
Boot Files
Commands
 

 
 Windows

Software
 


DOS Boot Files

 Config.sys

The Config.sys file system contains the location of any device drivers or special settings that need to be loaded during start up. You can edit Config.sys using any text editor. Edit.com is provided with DOS for editing text files. You can also use Notepad in Windows95. Below is a basic Config.sys file. Note: before editing Config.sys it's a good idea to make a second copy. You can do that in DOS by typing "copy config.sys config.bak". That will make a second copy named Config.bak.

This is what a basic Config.sys file looks like but yours may be different:

DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=UMB
LASTDRIVE=G
DOS=HIGH
DEVICEHIGH=C:\SB16\DRV\CTMMSYS.SYS
DEVICEHIGH=C:\PDPACK\CD.SYS /D:CD001

This is what each line does in this example:

DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS

These are the memory managers provided by Microsoft. In this case both Himem.sys and Emm386.exe are located on C: in the DOS folder. The NOEMS following EMM386.EXE tells DOS not to use Expanded Memory. DEVICE= tells DOS this is a normal device driver. On your computer these files maybe located elsewhere.

DOS=UMB

You need this command in order for DOS to use the Upper Memory area. It tells DOS to keep a link between Conventional Memory and Upper memory

LASTDRIVE=G

This line tells DOS G: is the last drive letter used in the computer. This keeps DOS from reserving space for drives that don't exist.

DOS=HIGH

This line tells DOS to put itself into the Upper memory area.

DEVICEHIGH=C:\SB16\DRV\CTMMSYS.SYS

This loads a device driver for a Soundblaster sound card. In this case DEVICEHIGH= is used to put the driver in the Upper memory area so Conventional memory is left free.

DEVICEHIGH=C:\PDPACK\CD.SYS /D:CD001

This is the CD-ROM driver. The /D:CD001 is the name the driver gives the CD-ROM. Normally a floppy disk with an install program will come with the CD and directions on what switchs you can add after the sys file /D is the switch here and CD001 the value that goes with it.

 


 Autoexec.bat

The Autoexec.bat is what's known as a DOS batch file. All batch files have the extension *.bat. You can create your own batch files with any text editor. It's simply a list of typed DOS commands that are carried out 1 line at a time. The Autoexec.bat is special because it's the only *.bat file that automatically runs at the start of DOS.

This is what a basic Autoexec.bat file looks like but yours may be different:

@ECHO OFF
PROMPT $p
SET SOUND=C:\VIBRA16
SET BLASTER=A220 I5 D1 H5 P330 T6
SET MIDI=SYNTH:1 MAP:E
C:\VIBRA16\DIAGNOSE /S
C:\VIBRA16\MIXERSET /P /Q
PATH C:\DOS;C:\WINDOWS
LH C:\MOUSE\MOUSE
LH C:\DOS\MSCDEX.EXE /D:CD001

This is what each line does in this example:

@ECHO OFF

This is a batch file command that stops the lines in the batch file from being displayed or echoed to the screen.

PROMPT $p

This is a batch file command that changes the way the DOS prompt looks. By default the prompt looks like C:\>, after this command it looks like C:\.

SET SOUND=C:\VIBRA16

This line tells DOS that the directory location for the sound card drivers.

SET BLASTER=A220 I5 D1 H5 P330 T6

This line tells DOS the hardware settings used by the sound card. Sound Blaster is the leading sound card made by Creative Labs. Most software and other brand sound cards are compatible with it. These settings may present even if you don't have a Soundblaster Sound Card.

SET MIDI=SYNTH:1 MAP:E

This line contains additional settings for the MIDI portion of the Sound card. MIDI stands for Musical Instrument Digital Interface. It allows the computer to communicate with musical instruments. Normally the sound cards joystick port also doubles as a MIDI port. The Sound Card can usually simulate MIDI sounds internally as well.

C:\VIBRA16\DIAGNOSE /S

This line runs the Diagnose.exe program provided by the sound card maker. The /S is a switch used to engage certain settings within the program.

C:\VIBRA16\MIXERSET /P /Q

This line runs the Mixerset.exe program provided by the sound card maker. The /P and /Q are switches used to engage certain settings within the program.

PATH C:\DOS;C:\WINDOWS

This is a batch file command that sets a path for DOS to search automatically when you type a program name at the prompt.

LH C:\MOUSE\MOUSE

This line runs the mouse.com program needed to use a mouse in DOS. LH is the abbreviation for LOADHIGH which places the program into the Upper memory area if possible.

LH C:\DOS\MSCDEX.EXE /D:CD001

This is the Microsoft CD Extension program that allows DOS and Windows to use CD-ROM players. The /D:CD001 matches the name assigned by the CD.SYS line used in the Config.sys file. LH is the abbreviation for LOADHIGH which places the program into the Upper memory area if possible.

 


 The DOS Text Editor

Text files are files that contain only plain unformatted text (words). Microsoft includes the text editing program edit.com with DOS and Windows. When DOS is installed correctly you can run edit.com at any time by typing Edit at the DOS prompt. You can also create a new file or open an existing file by typing it's name directly afterwards.

In order for Edit to work correctly it's location should be specified in the PATH command inside the Autoexec.bat. Some Older versions also require Qbasic.exe in order for it to run properly.

 


 How to make Batch Files

You can make a batch file to automate commands in DOS. A batch file can be made with any text editor such as Edit or Notepad. It's just a list of DOS commands you would normally type by hand. If you use DOS a lot you may want to create a Batch file that display's a menu of the DOS programs you use the most. Here's how...

First thing you do is create a file named Menu.bat. This file clears the screen with the command cls. Then it echo's your menu to the screen.

This is the file Menu.bat

ECHO OFF
cls
echo.
echo Start Menu
echo ------------------------------
echo 1. Doom
echo 2. Warcraft II
echo ------------------------------
echo Type a Number and press ENTER:

Next you need a batch file for each program in the list. These batch files are named using the number of the menu item for the program you want to run.

This is the file 1.bat

CD C:\doom
doom.exe
CD\
menu.bat

This is the file 2.bat

CD C:\war2
war2.exe
CD\
menu.bat

How's it work? Put the menu.bat and all the numbered bat's onto C:\. When you type menu at the C:\ prompt the following is displayed on the screen.

Start Menu
------------------------------
1. Doom
2. Warcraft II
------------------------------
Type a Number and press ENTER:
C:\

The menu.bat is finished, all it does is display a list of menu items. The C:\ is the normal DOS prompt waiting for your next command. Now if you want to play doom and type 1, your actually starting the batch file named 1.bat. If you'll notice above 1.bat starts by typing CD C:\doom which switches to the doom directory. Next it types doom.exe which starts the game doom. When doom is finished it types CD\ which returns the prompt to C:\. Then it runs the menu.bat file again so the screen is cleared and the menu is displayed again.

To have Menu.bat run automatically when DOS is started add C:\Menu.bat to the bottom of your Autoexec.bat. That way menu.bat will be run automatically when DOS starts.


The contents of this page are 2009 Realm
Last Updated (January 1st, 2007)