CONFIG.SYS - Features, Requirements and Recommendations

Previously, the only way to get user preferences when starting up a computer consisted of two files stored in the main directory of the startup disk AUTOEXEC.BAT and CONFIG.SYS. These files are still required for the new MS.DOS and Win updates, but it is believed that they are no longer needed in new versions of Windows. This would be true if Microsoft had changed the way it worked with DOS, but so far everything remained the same.

Thus, they continue to work with the automatic execution batch file (AUTOEXEC) and the boot configuration file (CONFIG), which are edited by the MS-DOS batch file. To do this, enter edit c: \ autoexec.bat or c: \ config.sys in the command line.

Bit of theory

CONFIG.SYS Dos




Batch files are simply lists of commands. Many PC users who did not have problems with downloads do not know them very well and confuse the CONFIG and AUTOEXEC files with each other. CONFIG is much more than just SYS. However, it is the same list of commands as a text file with instructions for the computer. The two files are really similar to each other, they have a lot in common.

When the PC turns on, it checks all disks, peripherals and fills up memory. CONFIG.SYS does most of this work. Some functions may be handled by a batch file. But there are important tasks that only CONFIG can handle. He is always at the forefront when the computer boots up.





BIOS Embedded Procedures

After the PC starts its built-in BIOS routines, the code in the base I / O system looks for CONFIG to find out what to do next. This happens somewhat differently on old and new computers, but the principle is the same. CONFIG.SYS gets the opportunity to complete its task until the moment when DOS can load its shell. The DOS part is just tons of code for working with disks and the screen, while the other part is the shell. When a user or batch file enters a command, the processor does the work.

CONFIG.SYS can tell the computer when to load memory managers or CD-ROM drivers until DOS is able to find out what is happening. If the PC tried to download such things after the DOS boot was completed, many of them would not work, and CONFIG.SYS can output the DOS command processor and download the replacement:

BIOS Embedded Procedures




Very few people use shell replacement on their PC, but this can be done very simply by writing the full path immediately after the shell = instruction.

File reorganization

Since CONFIG SYS dos has all the triggering functions, it receives the first signal before DOS starts. Therefore, it is always better to add commands to CONFIG rather than to a batch file if the user has the ability to edit. Many programs that are usually written to a computer in AUTOEXEC can really only be placed in CONFIG. For example, you can put the PATH instruction in a batch file, which is almost always done by default, but the best way to specify PATH is to write it to the configuration file.









File reorganization




On the one hand, the path will be created until the shell starts working, and on the other hand, the PATH statement will take up a bit less memory when placed in the CONFIG SYS command. The same can be said about the SET function. Almost all users who have AUTOEXEC have its instructions in the wrong place. Better move them to CONFIG.

Benefits of Optimized Launch

One of the advantages of a batch file is that it only works when the command processor takes a position and can run programs. Few people know that a configuration file can do this too. He will not launch Microsoft Word or an Internet browser, but he is able to perform such work with utilities that fall into memory and remain there. In fact, any program loaded by CONFIG.SYS, as a rule, remains in memory.

This is done by the INSTALL or INSTALLHIGH commands. The latter uses memory better. Typical programs that can be loaded into the configuration file include FASTOPEN and SHARE, both of which do not work on Windows 95. But many other small programs will load well in CONFIG. If a user runs the utility in a batch file using the LOAD or LOADHIGH command to see if it works in CONFIG.SYS, this is a bad experiment. This will not work, failure may occur. If an experiment is needed, then simple operations are downloaded and tested first, then they do something serious.

To check the INSTALL or INSTALLHIGH command in the configuration file, simply put a question mark in front of the line containing this command. When the computer boots up, the user will be asked if he wants to activate the command on this line. If something goes wrong, restart the PC, skip this line when it appears, and then edit the CONFIG SYS file and remove the sign.

Functional Table

For those users who work with the CONFIG program, knowledge of function values ​​is often required. We put them in the table:

Function

Value

Break

Installation and cleaning, with advanced CTRL + C validation

CD and CHDIR

Change directory or display current

CHCP

Display valid character sets

CLS

Screen update

COPY

Copy files in the right place

CTTY

Computer control through terminal device change

DATE

Setting the present date

DEL

Delete specified files

DIR

Display the current folder location list

EXIT

Exit COMMAND and return to the previous program

LH and LOADHIGH

Download utility to upper memory

LOCK

Enabling direct access to storage for storing and retrieving data from it without processor involvement

MD

Formation of a folder or subfolder

PATH

Refinement of Windows 95 folders which will search for executing documents

PROMPT

Change the appearance of the command line

RD and RMDIR

Destroying a folder

REN and RENAME

Editing File Names

SET

Display installation environments

TIME

Display or set the current time

Type

Display a text document

UNLOCK

Disabling direct disk access

VER

OS version number display

Verify

The direction of the OS that the files were written to disk correctly with the status of the checks

Vol

Display volume label and serial number for disk

Configuration check

Since the configurations vary, it is recommended in practice to check which version of DOS is used. Procedure:

  • Press Windows-R to open the Run menu.
  • Type cmd and press Enter for the command line.
  • Type cd \ and press Enter.
  • Enter edit config.sys in the command window to open the editor for the configuration file.
  • Enter configuration parameters for Config.
  • Himem is a high memory manager that loads DOS and EMM386. Extended memory support, disabled by the noems command.
  • Add all devices that need to be loaded into the configuration file using the DEVICEHIGH command.
  • Enter LASTDRIVE = S, where S is the last letter of the drive to use for DOS.
  • Add CONFIG SYS file commands to change the configuration menu and load [MENU] MENUITEM STARTUP. This displays a menu at startup with the Startup and Network elements.
  • Next, enter [STARTUP] in the file along with any commands to run under this element, for example, the basic configuration in the previous example, which allows you to specify commands for various configurations based on upcoming tasks.
  • Press Alt-F and then S to save the file, then select "Save".
  • Press Alt-F, then X to exit or select “Exit” from the menu.

Getting extra memory

The following commands help your computer load programs into memory more efficiently, allowing you to have more space for MS-DOS programs and games. First make sure that there are the following three required lines at the beginning of the config.sys file:

Getting extra memory




Putting DOS = HIGH, UMB on the second line will help to save space, because it will load DOS into the upper memory before loading the memory manager. The following is an example of what a batch file might look like:

Batch file




For convenience of perception of information, we also put out the following commands in the table:

Team

Explanation

@echo off

Tells DOS to read lines, but not bring them back to the screen

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

The installed sound tells the computer to send all sound events that the computer can put in this directory

SET BLASTER = A220 I5 D1 H5 P330 E620 T6

Tells the computer to configure Sound Blaster settings, which is a good line for games or other programs that require sound (if there is this line in autoexec.bat and all settings for the sound card). A220 is port address 220, I5 is IRQ 5, and D1 is DMA 1. These settings are typical of most sound cards.

SET PATH = C: \ Windows; C: \

Sets the computer to search in the C: \ Windows or root directory if the command used at the prompt is not found

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

The line used for the CD-ROM. Windows 95+, MSCDEX will always be in C: \ Windows \ COMMAND. On Windows 3.x or DOS, this file is located in the C: \ DOS or C: \ Windows directory. / D: 123 - the name of the driver that is loaded into the upper memory. Usually / D: MSCD0001. You need to keep in mind that this is not a driver, but its name. If you change this line, it also needs to be adjusted in config.sys on the CD-ROM line. If these two values ​​do not match, the CD-ROM drive does not boot.

LH C: \ MOUSE \ MOUSE.EXE

Loads a mouse driver into memory. However, not all mice use the same drivers. It can be mouse.exe or mouse.com, as well as mouse.sys, which loads into config.sys.

C: \ DOS \ SMARTDRV.EXE / X

Loads the smartdrive disk cache utility into memory. Additional information about this utility is located on the smartdrv command page.

DOSKEY

DOS to load DOSKEY into memory

CLS

MS-DOS Screen Cleaner

WIN

Need for users running Windows 3.x. This line automatically loads Windows.

Mobile Phone Configuration

Mobile Phone Configuration




For privacy and security reasons, sometimes you need to turn off MTP and PTP on your mobile device. For example, when the status bar shows that the smartphone is connected, like a camera with PTP. This can happen with any USB hub. The user will not know about the failure until he connects to it. This operation is performed using config. For example, to run Android 5.0.2 on Samsung, do the following:

  • Turn on USB setup.
  • Connect to USB.
  • Root the device, and confirm the result.
  • Check in the emulator setprop sys usb CONFIG: $ su sh -c 'cat /data/property/persist.sys.usb.config' adb.
  • Disconnect the Rebooted cable.
  • Connect to USB.
  • After that, the device will automatically be connected as media, the parameters remain by default with the parameters setprop sys usb CONFIG diag adb: $ su sh -c 'cat /data/property/persist.sys.usb.config' mtp.
  • After disabling the setup, USB will reboot and the mtp, adb recovery process will go through.

Disabling Unauthorized Files on XP

Disabling Unauthorized Files on XP




Very often, during startup, programs are turned on in the background, which affects its performance. Viewing the list of programs will help you decide whether to enable or disable these files. The Start XP menu contains a system configuration editor that displays applications. In addition, the “System Configuration” window registers these applications on the “Launch” tab.

CONFIG SYS Windows XP System Configuration Edition:

  • Enter sysedit.exe in the Start menu, and then click OK to open the System Configuration Editor windows.
  • Click C: \ config to open the window.
  • Click "Start", then "Run."
  • Enter msconfig and then click “OK” to display the “System Configuration” window.
  • Go to the "Launch" tab to view these boot files and edit their work.

Rebooting a computer without loading features

This example is compiled for 24 MB of RAM on a home computer with several boot configurations and a batch file that load the scanner only when necessary, when the user needs it. Thus, the PC leaves space in its RAM. A regular user uses this feature to load peripheral devices only when necessary.

Procedure:

  1. First, all the software and hardware are downloaded.
  2. Then they modify the config and autoexec files.

Most installation procedures do not know how to handle setting up multiple configurations. All environment variables of the configuration file will be shown here. Before you begin, perform BACKUP.

Operation Table:

[MENU]

Start the file using the [MENU] command. Follow it through various menu items.

menuitem = games

The menudefault line indicates which menu item to choose, time in seconds. If the user did not select it, then the games will start in 10 seconds

menuitem = Network

The configuration file must have a TAG for each menu item that the user has installed. If it has nothing in config, but only in a batch file, it must also be configured.

menuitem = Games & Network

Games and Network

menudefault = Games, 10

The [COMMON] tag is optional and can be used for commands that will be shared by each configuration. Instead of repeating the same command in each tag, follow all tags with [COMMON] and add common commands

[Games]

Put everything here to fit the requirements of the game

[Network]

Put anything here for the web

[Scanner]

Put something here for the scanner

[Games & Network]

Put something here for both games and the web. In most cases, each of the sections above will be repeated.

The following code is written.

Rebooting a computer without loading features




Posting custom downloads

To do this, the Autoexec.bat file is adjusted, given that NO is returned after SET PATH. The path pointer must be on the same line. To find out if the path is longer than the limit, from the DOS prompt, type: path followed by ENTER, it will return a path statement. This way you can verify that everything is included in the batch file.

Posting custom downloads




Before any changes, BACKUP is pre-executed. rem multiple configuration.

Table of important commands:

rem multiple configuration

Start with rem.

PROMPT = $ P $ G

The PROMPT command tells what to use for the command line. In this case, $ P $ G will make the command line a:

Team path

C: \>

Put everything here that is available for all configurations. Sometimes you can specify some common things, depending on how you need to download them.

IF% CONFIG% == Games & Network GOTO Games

In this case, Soundblaster material is loaded. If your PC does not have enough memory, you may need to turn off the soundblaster for specific instances and enable it separately.

GOTO% CONFIG%

: Games rem here you would load your joysticks, and / or whatever is necessary for your games.

IF% CONFIG% == Games & Network GOTO Network GOTO END

If the configuration tag selected by the user in the configuration file is Games & Network, you can report this to GOTO Games. After completing the games, check and forward again so that he goes to the Network.

: Network rem here load your network commands. I prefer keeping my network commands in a separate .bat file and calling that .bat file from here. Goto end

This will save the user from having to duplicate information in the tag: Games & Network. The GOTO% CONFIG% command tells the .bat file to go to the TAG for the configuration selected by the user from the config.sys file.

: Scanner rem load your scanner stuff here GOTO END

: END

Now you can put your tags. Place a COLON followed by a tag, just like entering the configuration file.

SET PATH = C:; C: \ a \ vj \ EAB \ jdk \ bin; C: \ a \ vj \ EAB \ bin; C: \ a \ vj \ EAB \ odbc32; C: \ D2 \ BIN; C: \ D2 \ FUNCTION; C: \ D2 \ SNA \ SYSTEM; C: \ A \ J1 \ BIN; C: \ A \ ZIP; c: \ COREL \ OFFICE7 \ SHARED \ TRUEDOC \ BIN

After completing each section of the tag, use GOTO END to exit it and go to the END tag below.

As you can see, two iconic files play the role of the old world of MS-DOS, but today they have not lost their relevance. If a user has a software or hardware device that needs a driver that is not in the IO.SYS file or in the Windows registry, he will need to use the commands available in the CONFIG and AUTOEXEC files.




All Articles