What is Autoexec.bat & Config.sys files?

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.

•Type “edit c:\autoexec.bat” and hit Enter to edit the AUTOEXEC.BAT file. This will launch the MS-DOS EDIT application, a straightforward text editor, and open the AUTOEXEC.BAT file.

•Type “edit c:\config.sys” and hit Enter to edit the CONFIG.SYS file. This will open the MS-DOS EDIT application and open the CONFIG.SYS file.

•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 Information

•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:

        1.   REM PROMPT $P$G  

•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.

ADVERTISEMENT

1. DEVICE = C: \ Windows \ HIMEM.SYS  

2. DOS = HIGH, UMB  

3. DEVICE = C: \ Window \ EMM386.EXE NOEMS  

•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.

•Autoexec.bat layout

•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:

1. @echo off  

2. SET SOUND=C:\PROGRA~1\CREATIVE\CTSND  

3. SET BLASTER=A220 I5 D1 H5 P330 E620 T6  

4. SET PATH=C:\Windows;C:\  

5. LH C:\Windows\COMMAND\MSCDEX.EXE /D:123  

Here is an explanation of each of the lines in the example autoexec.bat file:

q@echo off –

•This line tells the command prompt not to display the commands as they are executed.

qSET 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.

qSET 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.

qSET PATH=C:\Windows: \ –

•This line sets the search path for executable.

•It tells the computer to look in the C:\Windows and C:\ directories for any programs that are run from the command prompt.

qLH 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.

•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:

1. DEVICE=C:\Windows\HIMEM.SYS  

2. DOS=HIGH,UMB  

3. DEVICE=C:\Windows\EMM386.EXE NOEMS  

4. FILES=30   5. STACKS=0,0  

6. . BUFFERS=20  

7. DEVICEHIGH=C:\Windows\COMMAND\ANSI.SYS  

8. DEVICEHIGH=C:\MTMCDAI.SYS /D:123  

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back