Autoexec.bat and config.sys Information
The AUTOEXEC.BAT and CONFIG files were developed for Windows 3.x and MS-DOS to load device and operating system data to function properly. SYS files were used in early versions of the Windows operating system to configure and customize the operating system during start-up. These files were frequently used to configure system settings, define environment variables, and load device drivers.
Note: The autoexec.bat and config. Windows versions no longer use sys files after XP.
How to edit these files?
You must launch a command prompt window and enter the proper command to edit the AUTOEXEC.BAT and CONFIG.SYS files using the MS-DOS EDIT command.
The commands and parameters included in the AUTOEXEC.BAT or CONFIG.SYS file can be added to or altered once the file is open in the EDIT software. After making changes, save the document by pressing F2 or choosing Save from the File menu.
Use the sysedit command if you have Windows 95, Windows 98, or Windows ME. Click Start, Run, then enter sysedit to launch it.
Note: Modifying the CONFIG.SYS and AUTOEXEC.BAT files might have detrimental effects since the operating system may not launch properly if the parameters are off. Unless you are familiar with the commands and parameters used in these files and are certain of what you are doing, it is typically advised to avoid making changes to them.
Remarking a line in the AUTOEXEC.BAT or CONFIG.SYS file allows you to prohibit that line from being run when the operating system boots up. If you wish to temporarily disable a command causing issues or test the impact of a specific command, this can be helpful.
You must add the REM command at the beginning of a line in the AUTOEXEC.BAT or CONFIG.SYS file to designate it as being remarked. The REM command instructs the operating system to disregard the remaining characters on the line and stop executing any commands.
For instance, you could use the command below to highlight a line in the AUTOEXEC.BAT file that sets the command prompt:
By doing this, the PROMPT command would not be run, and the operating system's default command prompt would not be altered.
Note: A line in the AUTOEXEC.BAT or CONFIG.SYS file can be marked, but that does not mean it has been deleted. The line is still present in the file and can, if needed, be edited or unremarked later.
Remove the REM command from the beginning of a line to unmark it. When the operating system starts, the line will perform as usual.
Getting additional memory
The operating system can be set up to load applications and devices into high memory, a portion above the first 640 KB of memory that is not typically used by the operating system. This configuration consists of the three lines of code shown above.
The HIMEM.SYS device driver, a memory manager used to control access to higher memory, is loaded in the first line, DEVICE=C:\Windows\HIMEM.SYS
The operating system is instructed to load itself (DOS) into upper memory before loading the memory manager in the second line, DOS=HIGH, UMB. As a result, more conventional memory (the first 640KB) can be used by other programs, freeing up upper memory for usage by the operating system's programs and data.
DEVICE=C:\Windows\EMM386.EXE NOEMS on line three, another memory manager used to control access to upper memory is EMM386.EXE NOEMS, which loads the EMM386.EXE device driver. The EMM386.EXE driver is instructed not to allocate any EMS (Expanded Memory Specification) pages, another sort of higher memory that some programs may use, using the NOEMS argument.
You can configure the operating system to load programs by adding these lines to the CONFIG.SYS file.
Config. Sys and autoexec.bat are loaded into high memory with all of the devices.
The autoexec.bat is a batch file that is run automatically whenever the computer starts. It is used to configure various settings and run programs when the computer boots up. The lines in the file are executed in the order they appear in the example.
Example autoexec.bat file:
Here is an explanation of each of the lines in the example autoexec.bat file:
@echo off - This line tells the command prompt not to display the commands as they are executed.
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND - This line sets the value of the SOUND environment variable to the specified path. The "~1" is a shorthand notation for the "Program Files" folder.
SET BLASTER=A220 I5 D1 H5 P330 E620 T6 - This line sets the value of the BLASTER environment variable to the specified string. The meaning of the individual characters in the string may vary depending on the hardware and drivers used.
SET PATH=C:\Windows: \ - This line sets the search path for executables. It tells the computer to look in the C:\Windows and C:\ directories for any programs that are run from the command prompt.
LH C:\Windows\COMMAND\MSCDEX.EXE /D:123 - This line loads the MSCDEX.EXE program, which stands for Microsoft CD-ROM Extension. The /D:123 argument specifies the device number of the CD-ROM drive. The LH command stands for "Load High, " meaning that the program will be loaded into upper memory if possible.
Some additional lines
C:\DOS\SMARTDRV.EXE /X - This line runs the SmartDrive disk cache utility, which is used to improve the computer's hard drive performance. The /X argument tells the utility not to load automatically the next time the computer starts.
DOSKEY - This line loads the doskey utility into memory, allowing you to use the arrow keys to recall previous commands, edit them, and create and execute command macros.
CLS - This line runs the cls (clear screen) command, which clears the console window of all text.
WIN - This line loads Windows 3.X. when the computer starts. Without this command, the MS-DOS prompt would be displayed when the computer started up. Note that this line only applies to users using Windows 3.X. If you are using a more recent version of Windows, you do not need this line in your autoexec.bat file.
The Config. Sys file is a system configuration file used by MS-DOS and some versions of Windows to specify settings that need to be set when the operating system is started. The lines in the file are executed in the order they appear in the example.
Example config. Sys file:
Here is an explanation of each of the lines in the example config.sys file:
DEVICE=C:\Windows\HIMEM.SYS - This line loads the HIMEM.SYS device driver is used to manage extended memory on the computer.
DOS=HIGH, UMB - This line tells the operating system to use upper memory blocks (UMBs) for device drivers and other programs. The HIGH keyword specifies that device drivers and other programs should be loaded into upper memory if possible.
DEVICE=C:\Windows\EMM386.EXE NOEMS - This line loads the EMM386.EXE device driver, providing expanded memory support. The NOEMS argument tells the driver not to use expanded memory.
FILES=30 - This line sets the maximum number of files that can be opened simultaneously to 30.
STACKS=0,0 - This line sets the stack size for the command interpreter and device drivers. The stack is a portion of memory used for storing temporary data.
BUFFERS=20 - This line sets the number of disk buffers (temporary storage areas for data being transferred to or from a disk) to 20.
DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS - This line loads the ANSI.SYS device driver, which is used to support ANSI escape sequences for screen control and text formatting.
DEVICEHIGH=C:\MTMCDAI.SYS /D:123 - This line loads the MTMCDAI.SYS device driver specifies the CD-ROM drive's device number as 123. The DEVICEHIGH keyword specifies that the driver should be loaded into upper memory if possible.
Some additional lines
LASTDRIVE= - This line allows you to specify the last drive installed on the machine. It helps to use system resources as efficiently as possible. This line is not recommended for use with newer versions of Windows, as they ignore it.
FCBS= - This line specifies the number of file control blocks (FCBs) required for file sharing. The operating system employs a data structure called an FCB to keep track of open files. You can define the number of FCBs set aside for file sharing using the FCBS line. FCBS can have a value between 1 and 255. Only use this line if a program specifically asks for it, as it is no longer commonly used or necessary.