Autoexec.bat and config.sys Information
Basically, the Config.sys and Autoexec.bat files are made for MS-DOS and Windows 3. x to load the device and operating system to work effectively. The most recent versions of MS-DOS and Windows 3.x cannot be loaded without these files. But newer versions of windows are no longer needed.
How to edit the files
Config.sys and Autoexec.bat are both files that may be modified using the MS-DOS command file editor. If you want to edit this file, type edit c:\autoexec.bat, or to edit the Config.sys file, type edit c:\config.sys. The mouse won't function if the mouse drivers are not correctly loaded.
If you have window 95, window 98, or other window ME, and then it is recommended to use the sysedit command. To run sysedit, you have to click on Start, Run and type sysedit.
Note: Window XP is not currently used in the autoexec.bat or Config.sys file.
Remarking Information
We can temporarily or permanently prevent a line from loading each time the computer boots by identifying certain lines in the autoexec.bat or Config.sys files. Before each line you want to skip, put REM to indicate it as a remark.
Note: If you find some error with an autoexec.bat lie, remark the lie instead of deleting the line in case if it needs to be added again.
Getting additional memory
To load the program into the memory more efficiently in the computer, you have to use the code that is following, which will help to have a memory for MS-DOS programs and games as well.
The first three lines of your Config.sys file should be as shown below before you begin.
DEVICE = C: \ Windows \ HIMEM.SYS
DOS = HIGH, UMB
DEVICE = C: \ Window \ EMM386.EXE NOEMS
Because DOS is loaded into higher memory before it is loaded into upper memory, in the memory manager, setting DOS = HIGH, UMB on the second line allows for memory savings. The first and third lines, which serve as the memory managers, cannot be put into high memory.
Loading of all devices in the Config.sys and autoexec.bat into high memory.
Autoexec.bat layout
There is following example of autoexec.bat:
@echo off
SET SOUND=C: \ PROGRA~1 \ CREATIVE \ CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C: \ Windows; C: \
LH C:\Windows \ COMMAND \ MSCDEX.EXE / D: 123
There is following some line that are common found in the autoexec.bat for further information about each of the given line:
@echo off
It is used to say MS-DOS to read the lines but not to echo their result back to the screen.
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
The set sound command instructs the computer to transmit all sound events to the directory holding the sound drivers.
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
This line instructs the computer to configure the Sound Blaster settings, which is useful for computer games and other programmers that require sound. You have all sound card options if you have this line in your autoexec.bat. I5 stands for IRQ 5, and D1 for DMA 1. I5 is IRQ 5, D1 is DMA 1, and A220 is a port address of 220. The majority of sound cards have the following default settings.
SET PATH=C: \Windows; C:\
The computer is programmed to look in the root or the C: Windows directory if a command entered at the prompt is not found.
LH C:\Windows\COMMAND\MSCDEX.EXE /D: 123
The CD-ROM is loaded into the high memory region using this line. The MSCDEX is detected in the C:\WindowsCOMMAND directory if you have Windows 95 or later. This file is located in the C:\DOS or C:\Windows directory in Windows 3. x or DOS. The /D: 123 specifies the name of the upper-memory driver; it can be anything, but it's generally /D: MSCD0001. Remember that this is the driver's moniker, not his or her actual name. If you modify this line, you must also modify the Config.sys file on your CD-ROM line. Your CD-ROM drive will not load if the two are not identical.
LH C:\MOUSE\MOUSE.EXE
The mouse driver is loaded into high memory. Not all mouse, however, utilize the same drivers. The mouse might utilize mouse.exe, but it could also be "mouse.com" or "mouse.sys," which is also loaded in the Config.sys file.
C:\DOS\SMARTDRV.EXE /X
Smartdrive disc cache utility is loaded into memory.
DOSKEY
Doskey must be loaded into memory before it can be used from the command line.
CLS
To clean the screen, use the MS-DOS command cls.
WIN
This line launches Windows automatically when the machine boots up for people using Windows 3. x. The computer would only load to the MS-DOS prompt if you didn't use this command.
Note: - A DOS text file should only be created or edited with a DOS editor like Modify, EDLIN, or TED. Use text (ASCII) format rather than any other specific file type that the word processor may support if you're using a word processor to save the file.
A DOS text file should only be created or edited with a DOS editor like Modify, EDLIN, or TED. Use text (ASCII) format rather than any other specific file type that the word processor may support if you're using a word processor to save the file.
Usage: -AUTOEXEC.BAT When DOS boots up, it reads BAT, including MS-DOS version 7.x, which is used in Windows 95 and Windows 98. Windows ME only parses environment variables to reduce reliance on the past, however this may be avoided.
Disk Control Program (DCP), an MS-DOS version developed by the old East-German VEB Robotron, also used the filename.
In Korean versions of MS-DOS/PC DOS 4.01 and higher, COMMAND.COM will look for a file named KAUTOEXE if the current country code is set to 82 (for Korea), no /P: filename is supplied, and no default AUTOEXEC.BAT is identified (except for PC DOS 7 and 2000). Rather, make sure the DBCS frontend drivers are loaded via BAT, even if the CONFIG.SYS and AUTOEXEC.BAT files aren't set up correctly.
Config.sys layout
An example of how the config.sys may appear is shown below: -
DEVICE=C:\Windows\HIMEM.SYS
DOS=HIGH, UMB
DEVICE=C:\Windows\EMM386.EXE NOEMS
FILES=30
STACKS=0, 0
BUFFERS=20
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123
The following are some of the more commonly encountered lines in the Config.sys file, along with more information about each line.
DEVICE=C:\Windows\himem.sys
The himem.sys line is crucial; it allows you to load drivers into the high memory region. Windows 3. x will not load if this line is missing.
DOS=HIGH, UMB
A high memory block in an upper memory block has to be loaded using DOS.
Note: After the himem.sys file, add this line.
DEVICE=C:\Windows\EMM386.EXE NOEMS
The extended memory manager is loaded via the EMM386 line. Some older MS-DOS games, on the other hand, have issues with expanded memory and won't operate without the NOEMS declaration.
FILES=30
Windows may load up to 30 files at once using the files line. Going higher, on the other hand, may degrade the computer's performance; 30 has been shown to be the optimal setting. Also, make sure the line is one continuous line with no gaps between and after the =. (equal sign).
STACKS=0, 0
When an asynchronous hardware event occurred, the stack line was initially used in MS-DOS 3.2 to swap the stack. The line STACKS=0,0 was later added to the Config.sys in MS-DOS 3.3. This line was modified to STACKS=9,128 in specific instances.
The STACKS command has an 8-64, 32-512 range of values. If you input a greater value, you'll get a "FATAL: Internal stack failure, system suspended" error.
BUFFERS=20
The Buffers line loads buffers into memory, which allows Windows to load memory.
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS
The ANSI.sys line is a DOS driver that allows you to customize the DOS prompt with multiple colors, sizes, and special characters.
DEVICEHIGH=C: \MTMCDAI.SYS /D:123
The CD-ROM drivers are used to control the CD-ROM drive. The /D:123 denote the driver's name, which is 123 in this case, but maybe anything, generally MSCD0001. It's important to remember that the /D:123 in Config.sys and autoexec.bat must match. If they're not the same, the CD-ROM won't operate in MS-DOS.
LASTDRIVE=
Allows you to select the computer's most recent hard drive. This line should only be used if you're running Windows 3.11 or older because newer versions of Windows disregard it.
FCBS=
This line specifies the amount of file control blocks that can be used for file sharing. It should only be utilized when applications demand it, which is not the case currently. Between 1 and 255 can be used by FCBS.
Usage: During startup, MS-DOS and 16-bit versions of Microsoft Windows employ a text file called Config.sys to configure the hardware of the machine.
A computer's memory, keyboard, mouse, printer, and other peripherals are configured using the Config.sys file. Any text editor can edit the Config.sys file, which is an ASCII file.