AUTOEXEC.BAT is a system file found originally on DOS-type operating systems. It is a plain-text batch file that is in the root directory of the boot device. The name of the file is an abbreviation of «automatic execution», which describes its function in automatically executing commands on system startup; the portmanteau was coined in response to the 8.3 filename limitations of the FAT file system family.
Usage[]
AUTOEXEC.BAT is read upon startup by all versions of DOS, including MS-DOS version 7.x as used in Windows 95 and Windows 98. Windows Me only parses environment variables as part of its attempts to reduce legacy dependencies, but this can be worked around.
Under DOS, the file is executed once the operating system has booted and after the CONFIG.SYS file has been processed. Windows NT and its descendants Windows XP and Windows Vista parse AUTOEXEC.BAT when a user logs on. As with Windows Me, anything other than setting environment variables is ignored. Unlike CONFIG.SYS, the commands in AUTOEXEC.BAT can be entered at the interactive command line interpreter. They are just standard commands that the computer operator wants to be executed automatically whenever the computer is started, and can include other batch files.
AUTOEXEC.BAT is most often used to set environment variables such as keyboard, soundcard, printer, and temporary file locations. It is also used to initiate low level system utilities, such as the following:
- Virus scanners
- Disk caching software — SMARTDRV.EXE from Microsoft the most common
- Mouse drivers
- Keyboard drivers
- CD drivers
- Miscellaneous other drivers
Example[]
In early versions of DOS, AUTOEXEC.BAT was by default extremely simple. The DATE
and TIME
commands were necessary as early PC and XT class machines did not have a battery backed-up real-time clock as default.
ECHO OFF CLS DATE TIME VER
In non-US environments the keyboard driver (like KEYBFR for the French keyboard) was also included. Later versions were often much expanded with numerous third-party device drivers. The following is a basic DOS 5.x type AUTOEXEC.BAT configuration, consisting only of essential commands:
@ECHO OFF PROMPT $P$G PATH C:\DOS;C:\WINDOWS SET TEMP=C:\TEMP SET BLASTER=A220 I7 D1 T2 LH SMARTDRV.EXE LH DOSKEY LH MOUSE.COM /Y WIN
This configuration sets common environment variables, loads the disk cache SmartDrive on line six, places common directories into the default path, and initializes the DOS mouse / keyboard drivers, before starting Windows. The prompt
command sets the command prompt to «C:\>» instead of simply «C>».
In general, .SYS files were called in CONFIG.SYS, and .EXE programs such as the popular disk caching software SmartDrive provided by Microsoft with MS-DOS 5x, were loaded in the AUTOEXEC.BAT file. Some devices, such as mice, could be loaded either as a .SYS file in CONFIG.SYS, or as a .COM in AUTOEXEC.BAT, depending upon the manufacturer.
Lines prefixed with the string «REM» are comments (remarks) and are not run as part of AUTOEXEC.BAT. The «REM» lines are used for comments or to temporarily disable drivers (e.g. for a CD-ROM). An alternative, though less common, method for commenting is using double colons (::).
In MS-DOS 6 and higher, a DOS boot menu is configurable. This can be of great help to users who wish to have optimized boot configurations for various programs, such as DOS games and Windows. (continued from CONFIG.SYS article)
@ECHO OFF PROMPT $P$G PATH C:\DOS;C:\WINDOWS SET TEMP=C:\TEMP SET BLASTER=A220 I7 D1 T2 GOTO %CONFIG% :WIN LH SMARTDRV.EXE LH MOUSE.COM /Y WIN GOTO END :XMS LH SMARTDRV.EXE LH DOSKEY GOTO END :END
The goto %CONFIG%
line informs DOS to look up menu entries that were defined within CONFIG.SYS
. Then, these profiles are named here and configured with the desired specific drivers and utilities. At the desired end of each specific configuration, a goto
command redirects DOS to the :END
section. Lines after :END
will be used by all profiles.
Dual-booting DOS and Win 9x[]
When installing Windows 95 over a preexisting DOS/WINDOWS install, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9.x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Win95 versions are made as .W40
files.
Windows 9x also installs a fake MSDOS.SYS file. This file contains some switches that designate how the system will boot, one of which controls whether or not the system automatically goes into Windows. This «BootGUI» option must be set to «0» in order to boot to a DOS prompt. By doing this, the system’s operation essentially becomes that of a DOS/Windows pairing like with earlier Windows versions. Windows can be started as desired by typing «WIN» at the DOS prompt.
When installing Caldera DR-DOS 7.02 and higher, the Windows version retains the name AUTOEXEC.BAT, while the file preferred by the DR-DOS loader is named AUTODOS7.BAT. It also differentiates the CONFIG.SYS file by using the name DCONFIG.SYS.
Windows NT[]
On Windows NT and its derivatives, Windows 2000, Windows Server 2003 and Windows XP, the equivalent file is called AUTOEXEC.NT and is in the %SystemRoot%\system32
directory. The file is not used during the operating system boot process; it is executed when the MS-DOS environment is started, which occurs when an MS-DOS application is loaded.
The AUTOEXEC.BAT file may often be found on Windows NT, in the root directory of the boot drive. Windows only considers the «SET» and «PATH» statements which it contains, to define environment variables global to all users. Setting environment variables through this file may be interesting if for example MS-DOS is also booted from this drive (this requires that the drive be FAT) or to keep the variables across a reinstall. This is an exotic usage today so this file usually remains empty. The TweakUI applet from the PowerToys collection allows to control this feature (Parse Autoexec.bat at logon).
OS/2[]
OS/2 did not use the AUTOEXEC.BAT file, instead using startup.cmd.
See also[]
- DOS
- IBMBIO.COM
- IBMDOS.COM
- IO.SYS
- MSDOS.SYS
- COMMAND.COM
- CONFIG.SYS
|
Wikipedia This page uses Creative Commons Licensed content from Wikipedia (view authors). |
---|
From Wikipedia, the free encyclopedia
AUTOEXEC.BAT
is a system file that was originally on DOS-type operating systems. It is a plain-text batch file in the root directory of the boot device. The name of the file is an abbreviation of «automatic execution», which describes its function in automatically executing commands on system startup; the filename was coined in response to the 8.3 filename limitations of the FAT file system family.
AUTOEXEC.BAT
is read upon startup by all versions of DOS, including MS-DOS version 7.x as used in Windows 95 and Windows 98. Windows Me only parses environment variables as part of its attempts to reduce legacy dependencies,[1] but this can be worked around.[2]
The filename was also used by Disk Control Program [de] (DCP), an MS-DOS derivative by the former East-German VEB Robotron.[3]
In Korean editions of MS-DOS/PC DOS version 4.01 and higher (except for PC DOS 7 and 2000), if the current country code is set to 82 (for Korea) and no /P:filename
is given and no default AUTOEXEC.BAT
is found, COMMAND.COM
will look for a file named KAUTOEXE.BAT
instead in order to ensure that the DBCS frontend drivers will be loaded even without properly set up CONFIG.SYS
and AUTOEXEC.BAT
files.[4]
Under DOS, the file is executed by the primary copy of the command-line processor (typically COMMAND.COM
) once the operating system has booted and the CONFIG.SYS
file processing has finished. While DOS by itself provides no means to pass batch file parameters to COMMAND.COM
for AUTOEXEC.BAT
processing, the alternative command-line processor 4DOS supports a 4DOS.INI
AutoExecParams
directive and //AutoExecParams=
startup option to define such parameters.[5] Under Concurrent DOS, Multiuser DOS and REAL/32, three initial parameters will be passed to either the corresponding STARTxxy.BAT
(if it exists) or the generic AUTOEXEC.BAT
startup file, %1
holds the virtual console number,[6] %2
the 2-digit terminal number (xx) (with 00 being the main console) and %3
the 1-digit session number (y).[7]
Windows NT and its descendants Windows XP and Windows Vista parse AUTOEXEC.BAT
when a user logs on. As with Windows Me, anything other than setting environment variables is ignored.[8] Unlike CONFIG.SYS
, the commands in AUTOEXEC.BAT
can be entered at the interactive command line interpreter. They are just standard commands that the computer operator wants to be executed automatically whenever the computer is started, and can include other batch files.
AUTOEXEC.BAT
is most often used to set environment variables such as keyboard, soundcard, printer, and temporary file locations. It is also used to initiate low level system utilities, such as the following:
- Virus scanners
- Disk caching software
- Mouse drivers
- Keyboard drivers
- CD drivers
- Miscellaneous other drivers
In early versions of DOS, AUTOEXEC.BAT
was by default very simple. The DATE
and TIME
commands were necessary as early PC and XT class machines did not have a battery backed-up real-time clock as default.
@ECHO OFF CLS DATE TIME VER
In non-US environments, the keyboard driver (like KEYB FR
for the French keyboard) was also included. Later versions were often much expanded with numerous third-party device drivers. The following is a basic DOS 5 type AUTOEXEC.BAT
configuration, consisting only of essential commands:
@ECHO OFF PROMPT $P$G PATH C:\DOS;C:\WINDOWS SET TEMP=C:\TEMP SET BLASTER=A220 I7 D1 T2 LH SMARTDRV.EXE LH DOSKEY LH MOUSE.COM /Y
This configuration sets common environment variables, loads a disk cache, places common directories into the default PATH, and initializes the DOS mouse / keyboard drivers. The PROMPT
command sets the prompt to «C:\>» (when the working directory is the root of the C drive) instead of simply «C>» (the default prompt, indicating only the working drive and not the directory therein).
In general, device drivers were loaded in CONFIG.SYS
, and programs were loaded in the AUTOEXEC.BAT
file. Some devices, such as mice, could be loaded either as a device driver in CONFIG.SYS
, or as a TSR in AUTOEXEC.BAT
, depending upon the manufacturer.[9]
In MS-DOS 6.0 and higher, a DOS boot menu is configurable. This can be of great help to users who wish to have optimized boot configurations for various programs, such as DOS games and Windows.
@ECHO OFF PROMPT $P$G PATH C:\DOS;C:\WINDOWS SET TEMP=C:\TEMP SET BLASTER=A220 I7 D1 T2 GOTO %CONFIG% :WIN LH SMARTDRV.EXE LH MOUSE.COM /Y WIN GOTO END :XMS LH SMARTDRV.EXE LH DOSKEY GOTO END :END
The GOTO %CONFIG%
line informs DOS to look up menu entries that were defined within CONFIG.SYS
. Then, these profiles are named here and configured with the desired specific drivers and utilities. At the desired end of each specific configuration, a GOTO
command redirects DOS to the :END
section. Lines after :END
will be used by all profiles.
Dual-booting DOS and Windows 9x
[edit]
When installing Windows 95 over a preexisting DOS/Windows install, CONFIG.SYS
and AUTOEXEC.BAT
are renamed to CONFIG.DOS
and AUTOEXEC.DOS
. This is intended to ease dual booting between Windows 9x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS
and AUTOEXEC.BAT
. Backups of the Windows 9x versions are made as .W40
files.
Windows 9x also installs MSDOS.SYS
, a configuration file, which will not boot Windows 95/98 if parameterBOOTGUI=0
is loaded, and instead a DOS prompt will appear on the screen (Windows can still be loaded by calling the WIN
command (file WIN.COM). This file contains some switches that designate how the system will boot, one of which controls whether or not the system automatically goes into Windows. This «BootGUI» option must be set to «0» in order to boot to a DOS prompt. By doing this, the system’s operation essentially becomes that of a DOS/Windows pairing like with earlier Windows versions. Windows can be started as desired by typing WIN
at the DOS prompt.
When installing Caldera DR-DOS 7.02 and higher, the Windows version retains the name AUTOEXEC.BAT
, while the file used by the DR-DOS COMMAND.COM
is named AUTODOS7.BAT
, referred to by the startup parameter /P:filename.ext
in the SHELL directive. It also differentiates the CONFIG.SYS
file by using the name DCONFIG.SYS
.[10][11][12]
The equivalent to AUTOEXEC.BAT
under OS/2 is the OS/2 STARTUP.CMD
file. Genuine DOS sessions booted under OS/2 continue to use AUTOEXEC.BAT
.
On Windows NT and its derivatives, Windows 2000, Windows Server 2003 and Windows XP, the equivalent file is called AUTOEXEC.NT
and is located in the %SystemRoot%\system32
directory. The file is not used during the operating system boot process; it is executed when the MS-DOS environment is started, which occurs when a DOS application is loaded.
The AUTOEXEC.BAT
file may often be found on Windows NT in the root directory of the boot drive. Windows only considers the SET
and PATH
statements which it contains, in order to define environment variables global to all users. Setting environment variables through this file may be interesting if for example MS-DOS is also booted from this drive (this requires that the drive be FAT-formatted) or to keep the variables across a reinstall. This is an exotic usage today so the file usually remains empty. The Tweak UI applet from the Microsoft PowerToys collection allows to control this feature (Parse AUTOEXEC.BAT at logon).
- COMMAND.COM
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- SHELL (CONFIG.SYS directive)
- CONFIG.SYS
- autorun.inf
- ^ ««Subst» Command Does Not Work in Autoexec.bat File in Windows Millennium Edition». Revision 1.3. Microsoft. 2007-01-31. KB288997. Q288997. Archived from the original on 2011-05-24. Retrieved 2007-07-04.
- ^ Ashumov, V. (2017) [2007]. «Some features of MS-DOS 8.0». Archived from the original on 2010-10-22. Retrieved 2010-11-21.
- ^ Kurth, Rüdiger; Groß, Martin; Hunger, Henry (2016-11-29) [2007]. «Betriebssystem DCP». www.robotrontechnik.de (in German). Archived from the original on 2019-04-03. Retrieved 2019-04-28.
- ^ Paul, Matthias R. (2001-10-25). «System file settings». Newsgroup: comp.os.msdos.programmer. Archived from the original on 2017-09-10. Retrieved 2014-08-06.
[…] [W]hat’s KAUTOEXE.BAT? […] This is a special case in Korean MS-DOS/PC DOS 4.01+. It is still present in MS-DOS 7.10 (Windows 98SE, I’m not sure about 8.0 aka ME), but it vanished in PC DOS 7/2000. If the current country code is 82 […] and […] no /P:filename was specified *and* no default AUTOEXEC.BAT file was found, COMMAND.COM will instead execute a file named KAUTOEXE.BAT, if it exists. Presumably, this is used to ensure that the DBCS frontend drivers are loaded without properly set up CONFIG.SYS or AUTOEXEC.BAT files. […]
- ^ Brothers, Hardin; Rawson, Tom; Conn, Rex C.; Paul, Matthias R.; Dye, Charles E.; Georgiev, Luchezar I. (2002-02-27). 4DOS 8.00 online help.
- ^ Concurrent DOS Multiuser/Multitasking Operating System — Print Spooler User’s Guide (PDF). Digital Research. 1989-02-01. Archived (PDF) from the original on 2016-11-05. Retrieved 2014-08-12.
- ^ «FYI — Configuring CSPOOL». Novell. 1992-12-29. FYI.M.1901. Archived from the original on 2016-11-05. Retrieved 2014-08-12.
- ^ «INFO: Configuring Parsing of the AUTOEXEC.BAT» (1 ed.). Microsoft. 2007-03-20 [2002-06-11]. Q124551. Archived from the original on 2019-04-21. Retrieved 2017-09-10.
- ^ «Mouse Doesn’t Work with MS-DOS Shell». Microsoft. 2007 [1994]. KB96706. Q96706. Archived from the original on 2007-03-11. Retrieved 2006-10-15.
- ^ «Chapter 1: Introduction to DR-DOS». Caldera DR-DOS 7.02 User Guide. Caldera, Inc. 1998 [1993, 1997]. Archived from the original on 2016-11-05. Retrieved 2013-08-10.
- ^ Caldera DR-DOS 7.02 User Guide. Caldera, Inc. 1998 [1993, 1997]. Archived from the original on 2016-11-05. Retrieved 2013-08-10.
- ^ «FYI — Configuring LOADER.COM for Multiple Operating System Boots — Installing DR DOS on NEC DOS 3.3 Partitions». Novell. 1993-01-05. FYI.M.1909. Archived from the original on 2016-11-05. Retrieved 2014-08-12.
Many of those that used MS-DOS in its heyday, would remember spending time on these two files – AUTOEXEC.BAT and CONFIG.SYS to optimise and configure their PC as needed. Sometimes careful placement of commands were needed to maximise the 640 KB of conventional memory to avoid “out of memory” errors for Windows applications and games. When you knew you had overall 8 or 16 of MB RAM in those days thinking you had plenty, let’s just say it had its moments of frustration due to TSR (Terminate and Stay Resident) programs and so forth.
Fortunately we don’t need to worry about now, but I think the flip side to that was that it felt like an accomplishment when you had your PC well configured at a time when using a computer wasn’t common knowledge like it is today and with ever increasing automation.
For those running MS-DOS in some form, this is a quick reference guide to both of these files, and what many of the more common commands meant. Usually on Drive C or boot floppy disks, both of these files are located on your start up disk at the root directory (i.e. at A:\> or C:\>).
Note that it’s easy to cause issues with DOS upon start up just from a typo that may cause hardware not to function for instance, so it doesn’t hurt to create a backup copy of these files before making any changes.
Before we get into the actual files itself, it helps to understand at least a basic understanding of memory. I’m sure some of you know in great detail how this works, but for those that don’t know or have forgotten over the years, the next part is a basic explanation of the different memory components.
BASIC OVERVIEW OF MEMORY
Based on the x86 architecture, there became four sections as it were in relation to memory as shown in the diagram below. Despite the technological advancements over the years, the same logic applies since the original IBM XT PC in 1981.
Memory management.
Conventional Memory
Conventional memory is the first 640 KB of memory that was instantly accessible by DOS to be used for running programs. Programs initially could only consume this space, though over time with additional device drivers in memory and so forth it became more troublesome. Back in the early 1980s, the first 64 to 256 KB of memory could be found on the motherboard directly, with the use of an expansion card to extend the size. The IBM XT PC and a number of PC compatibles used the Intel 8088 processor that could support up to 1 MB of RAM due to limitations of the 20-bit address bus. It also only supported running in real mode.
Upper Memory Area
For the remaining 384 KB of the first 1 MB, the upper memory area (UMA) was dedicated to hardware functions such as the video adapter, system BIOS, and peripherals. In reality a large portion of this memory space was available for use. Gradually when using only conventional memory was becoming problematic as programs grew in complexity, techniques were developed to utilise this space as useable RAM known as upper memory blocks (UMBs). Programs such as MS-DOS’ own EMM386 and MEMMAKER, and Quarterdeck’s QEMM allowed certain driver programs (i.e. MSCDEX for CD-ROM drives) to be moved into the UMA to free up space in conventional memory, which would result in more memory available for your DOS programs.
A joint cooperation between Intel, Microsoft, and Lotus developed LIM EMS. This stood for Lotus Intel Microsoft Expanded Memory Specification, though was generally referred to as just EMS. It was implemented to overcome the issues of being restricted to 1 MB of RAM with 8088 and 8086 PCs in use at the time. Bank switching techniques were use by re-addressing extended memory into the UMA with the use of memory expansion cards before 386 PCs came about.
High Memory Area
Above the UMA sat the high memory area (HMA) and is only just shy of 64 KB in total that became available with the introduction of Intel’s 286 processor and extended memory found in the original IBM AT and compatibles. The 286 processor had a 24-bit address bus and could support up to 16 MB of RAM. It was also the first to support both real mode and protected mode, though real mode was meant to be fully compatible with how an 8088 processor would operate for software compatibility and be limited to only 1 MB of RAM. To cut to the chase, the HMA was reserved due to an issue with supporting real mode that utilises only a 20-bit address bus like with the 8088. Instead of using a memory address within that bus, it uses the next following memory address that is available from having a 24-bit address bus. Due to this, when a 286 PC was in real mode it could access the HMA just above the 1 MB threshold.
With the introduction of MS-DOS 5.0, HIMEM.SYS was available to allow the DOS kernel to be loaded into the HMA to preserve conventional memory. HIMEM.SYS was also required to utilise RAM above 1 MB.
Extended Memory
For PCs with a 286 or greater processor this simply referred to the memory above the first 1 MB of address space. Apart from the HMA, the rest of this memory was not available in real mode. A PC needs to run in protected mode to make use of the additional memory. As mentioned just before the 286 had a 24-bit address bus supporting up to 16 MB of RAM, with 15 MB as extended memory. When the 386 processor was introduced it came with a 26-bit address bus that allowed up to 4 GB of RAM to be theoretically addressed. In reality however I haven’t seen a 386 with anything greater than 64 MB of RAM. Combined with the HMA, it’s known as the Extended Memory Specification (XMS).
CONFIG.SYS
Out of the two files, CONFIG.SYS is loaded first by DOS and handles the configuration of your PC’s components. Sometimes what’s loaded here is complimented with another component that is to be run afterwards via AUTOEXEC.BAT. This typically occurs for CD-ROM drives and sound card drivers.
Below is a list of examples of what you may find in your CONFIG.SYS file:
BUFFERS=10,0
Allocates memory for disk buffers when the computer starts from the hard disk, that’s used for transferring data to and from the drive. The first value of 10 here is to specify the number of disk buffers. The value range is from 1 up to 99. The following value shown as 0 is an optional value and specifies the number of buffers in the secondary buffer cache. The default value in MS-DOS 6.x is 0 though the range is 0 up to 8. MS-DOS 5.0 would default to 1 as the zero value wasn’t yet available.
In this example the value of 10 would mean allocating between 256 to 511 KB of RAM for this purpose. If buffers are not specified, the default value will be used based on the amount of memory available. Isn’t a mandatory option.
COUNTRY=061,,C:\DOS\COUNTRY.SYS
Applies the appropriate currency, time, and date conventions for the selected country and determining the characters that can be used for filenames. In this example the value 061 represents the country in this case International English, while a 001 value would represent the United States. The values tend to match or closely match the country’s international dialling codes. The following between the commas can be utilised to specify a specific character set. Non-English orientated MS-DOS versions such as Arabic and Japanese will have separate character sets and options available. At the DOS prompt, use the command help country to bring up the MS-DOS Help program with additional details.
DEVICE=
Each hardware component is known as a device, and this indicates to DOS that its to load a device driver for a specific component. This is typically used for managing memory, CD-ROM drives, and sound cards for instance. Components such as hard disks, keyboards, and monitors do not require a device driver as DOS contains these built-in.
DEVICE=C:\DOS\HIMEM.SYS
HIMEM.SYS is a device driver to allow DOS programs to access and store data in XMS meaning beyond the first 1 MB. Extended memory became available with the introduction of Intel’s 286 processor. This file is required in order to run Windows.
HIMEM.SYS has additional switch options though generally are not used. At the DOS prompt, use the command help himem to bring up the MS-DOS Help program with additional details.
DEVICE=C:\DOS\EMM386.EXE
EMM386 is an extended memory manager originally designed as a software solution with Intel’s 386 processors taking advantage of the virtual 8086 mode introduced. It allows drivers to be loaded into the UMA and use some of the extended memory into expanded memory. Although sounding similar and can easily be confused, expanded memory would re-address the memory to fit into the 640 KB to 1 MB range. HIMEM.SYS is to precede before loading EMM386.EXE in CONFIG.SYS.
A few switch options are available such as:
DEVICE=C:\DOS\EMM386.EXE NOEMS
Provides only access to the UMA.
DEVICE=C:\DOS\EMM386.EXE RAM
Provides access to both UMA and EMS.
DEVICE=C:\DOS\EMM386.EXE 1024 RAM
Specifies the maximum amount of extended memory to use to emulate EMS. By default it’s the amount of free extended memory when EMM386 is loaded, but you may adjust to as low as 64 or as high as 32,768 KB. In this example 1,024 KB has been specified.
DEVICE=C:\DOS\EMM386.EXE MIN=0 RAM
(For MS-DOS 6.x) Allows you allocate the minimum amount of extended memory to use to emulate EMS. EMM386 will reserve this specified amount with the value in KB. The range is set between 0 KB to the maximum stated above. By default the value is 256 KB.
Other lesser used switches are available such as reserving memory addresses for UMBs, and shadow RAM. At the DOS prompt, use the command help emm386 to bring up the MS-DOS Help program with additional details.
DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)
DISPLAY.SYS is used by DOS to display international character sets on EGA, VGA, and LCD monitors. The EGA value is used for both EGA and VGA monitors, otherwise the LCD value can be used.
Between the two commas the value is null, however this specifies the character set that your PC supports. Using the typical American/English version of DOS, it’s limited to character sets using the Latin alphabet such as Canadian-French. The value 437 can be used for United States, value 852 for Slavic, and value 863 for Canadian-French for example.
The following value of 1 represents the number of character sets your PC can support. If using EGA the maximum value here is 6, otherwise if LCD is used it can be no greater than 1.
At the DOS prompt, use the command help display.sys to bring up the MS-DOS Help program with additional details.
DEVICEHIGH=
Does the same as DEVICE= though loads the device driver into upper memory.
DOS=HIGH,UMB
Sets whether MS-DOS is to use the high memory area (HMA), and also whether upper memory blocks (UMBs) will be accessible. Frequently only DOS=HIGH is used.
FILES=30
The value is to specify the number of files that can be open at one time (program files, documents, etc.). A value too low may cause a program not to start at all, a value too high may affect performance. By default MS-DOS had used the value of 8, though installing a fresh copy of MS-DOS 6.22 would add this line in CONFIG.SYS with the default value of 30. The range is anywhere between 8 and 255, though the values of 30 and 40 were commonplace.
LASTDRIVE=Z
The range of values is A through to Z, and is to specify the maximum number of drives to be accessibly via MS-DOS. Isn’t a mandatory option.
NUMLOCK=ON
The value is either ON or OFF, to specify whether the Num Lock key is to be on or off when the computer starts. Useful if creating a menu via CONFIG.SYS, otherwise isn’t a mandatory option.
REM or ;
The following text is descriptive, not a command as such. Useful if you wish to note down about a particular command for future reference.
STACKS=9,256
Specifies the amount of memory to reserve for processing hardware interrupts. The value here of 9 represents the number of stacks. A valid value is either 0 or in the range of 8 through to 64 inclusive. The second value, 256, represents the size in bytes of each stack. A valid value is either 0 or in the range of 32 through to 512 inclusive.
AUTOEXEC.BAT
This file runs as a batch running each command in the exact order they’ve been placed. From here is where device programs are loaded, DOS environmental settings are set, and starting Windows automatically if desired.
@ECHO OFF
Anything after this command will not be visibly seen when the computer starts, but will run in the background. It’s effectively a way to minimise excessive text and screen scrolling when processing the commands.
PROMPT
Allows customisation of how the command prompt is displayed. If the command is used without any switches, the DOS prompt will simply appear as C> with C representing the active drive. Early versions of MS-DOS would have it appear this way by default.
PROMPT $P$G
Arguably the most common setting. The $P value represents showing the current drive and full directory path, and having the $G value afterwards represents having the greater-than symbol, e.g. C:\>.
PROMPT Hello!
Instead of using the available switches free case-sensitive text can be used instead. Therefore instead of seeing C> or C:\> for example, you’ll see Hello! or whatever text that was chosen.
PROMPT Hello! $P$G
You can then get creative based on the order. So with this command your DOS prompt will appear as Hello! C:\>.
Entering prompt/? at the command prompt provides the list of switches available. For convenience, here’s what can be chosen. Remember it’s going to appear in the order of the switches.
$Q – = (equal sign), $S – $ (dollar sign), $T – Current time
$D – Current date, $P – Current drive and path, $V – MS-DOS version number
$N – Current drive, $G – > (Greater-than symbol), $L – < (Less-than symbol)
$B – | (Pipe symbol), $H – Backspace (erases previous character)
$E – Escape code (ASCII code 27, left arrow symbol), $_ – Carriage return and linefeed
Creating a Customised Startup Menu
Typically a DOS-based system would start in a set configuration – load a few drivers, maybe automatically start Windows and that’s about it. You may find though, particularly with DOS games they can be fussy with the amount of conventional memory available. To minimise the hassle on an ongoing basis avoiding out of memory messages and the like, it’s possible to create a customised startup menu to set different system configurations based on your needs. This feature was introduced in MS-DOS 6.0.
Here I created a menu where by default after 10 seconds, Windows 3.1 will automatically start with sound and CD-ROM device drivers. In addition, a DOS sub-menu providing several options with memory and device drivers for various scenarios set out below. For comparison I’ve also mentioned the difference it makes to available conventional memory.
- Expanded memory, mouse, CD-ROM and sound card support (516 KB free)
- Extended memory, mouse, CD-ROM, and sound card support (488 KB free)
- Conventional memory only, mouse, and CD-ROM support (477 KB free)
- Expanded memory and mouse support (584 KB free)
- Extended memory and mouse support (556 KB free)
- Conventional memory only and mouse support (539 KB free)
- Conventional memory and keyboard only (556 KB free)
Note keep in mind depending on the hardware or virtual machine application used, device drivers can vary. In the below examples, I’ve used the Oak Technologies CD-ROM and Creative SoundBlaster 16 device drivers. Installing additional software or hardware at a later stage will likely require additional tweaking of these files to avoid unintended results.
CONFIG.SYS
CONFIG.SYS is where the bulk of the commands are located.
The [COMMON] section to start off with is any commands to be run regardless of configuration, such as the display driver and international settings.
The [MENU] section refers to the main menu.
MENUITEM=WINDOWS, Start Windows (Default)
The menu item Start Windows (Default) will appear on the main menu. When selected it will reference down to the [WINDOWS] section of CONFIG.SYS.
SUBMENU=DOS, DOS Startup Options…
Appears as another item as DOS Startup Options… on the main menu, however will bring up an additional menu upon selection. Again it will reference down to the [DOS] section of CONFIG.SYS.
MENUCOLOR=15,1
Refers to the colour of the text and background. In this example the value of 15 displays bright white text, whilst 1 provides a blue background. Without this specified, the default values are 7 and 0 respectively to provide the standard white text on black background. The colour choices go back to the 16-colour palette from the CGA video standard in the 1980s.
The use of ANSI.SYS or invoking the CLS command with reset back to default.
Image source: Wikipedia
MENUDEFAULT=WINDOWS,10
The default option is to start Windows 3.1, with WINDOWS referring to the [WINDOWS] section of CONFIG.SYS. The value of 10 represents the amount of time in seconds to wait before proceeding if no user interaction has occurred.
The [WINDOWS] section is for configuring memory as required for Windows 3.1 to work. As an option, the CD-ROM and sound device drivers were added.
The [DOS] section is to be the sub-menu, listing options in order. Each abbreviation refers to their respective sections within CONFIG.SYS, followed by a description that will appear on the menu.
Sections [CM] and [CKB] are intentionally left empty. The former will rely on AUTOEXEC.BAT to load the mouse device driver, whilst the latter won’t load any device drivers at all.
[COMMON] DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1) DEVICE=C:\DOS\SETVER.EXE COUNTRY=061,,C:\DOS\COUNTRY.SYS DOS=HIGH,UMB FILES=40 STACKS=9,256 [MENU] MENUITEM=WINDOWS, Start Windows (Default) SUBMENU=DOS, DOS Startup Options... MENUCOLOR=15,1 MENUDEFAULT=WINDOWS,10 [WINDOWS] DEVICE=C:\WINDOWS\HIMEM.SYS DEVICE=C:\WINDOWS\EMM386.EXE NOEMS DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001 DEVICE=C:\SB16\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220 [DOS] MENUITEM=EMCD, Expanded Memory + Mouse + CD-ROM + Sound MENUITEM=XMCD, Extended Memory + Mouse + CD-ROM + Sound MENUITEM=CMCD, Conventional Memory Only + Mouse + CD-ROM MENUITEM=EM, Expanded Memory + Mouse MENUITEM=XM, Extended Memory + Mouse MENUITEM=CM, Conventional Memory Only + Mouse MENUITEM=CKB, Conventional Memory Only + Keyboard Only [EMCD] DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001 DEVICE=C:\SB16\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220 [XMCD] DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001 DEVICE=C:\SB16\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220 [CMCD] DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:MSCD001 [EM] DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF DEVICE=C:\DOS\EMM386.EXE RAM [XM] DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF [CM] [CKB]
AUTOEXEC.BAT
There’s slightly less to add in AUTOEXEC.BAT. Text highlighted in bold below is what has been added to support the menu. The initial text was part of the original file and can be left untouched.
As you’ll see it is referring back to the CONFIG.SYS file. Each line beginning with a colon is to match the names of each section from CONFIG.SYS. Essentially how it works is that if I chose to start Windows, the device drivers from the CONFIG.SYS [WINDOWS] section load first, then refers to the :WINDOWS within AUTOEXEC.BAT.
If I had chosen to start with only conventional memory and the mouse (therefore referring to the [CM] section of the files), after GOTO %CONFIG% it will skip all the way down and only load the mouse driver, MOUSE.COM.
@ECHO OFF C:\DOS\SMARTDRV.EXE /X PROMPT $P$G PATH C:\WINDOWS;C:\DOS SET TEMP=C:\DOS MODE CON CODEPAGE PREPARE=((437) C:\DOS\EGA.CPI) MODE CON CODEPAGE SELECT=437 GOTO %CONFIG% :WINDOWS SET BLASTER=A220 I5 D1 H5 P330 T6 SET SOUND=C:\SB16 SET MIDI=SYNTH:1 MAP:E C:\SB16\DIAGNOSE /S C:\SB16\MIXERSET /P /Q LH C:\DOS\MSCDEX.EXE /D:MSCD001 LH C:\DOS\MOUSE.COM WIN GOTO END :EMCD :XMCD GOTO SOUND GOTO CDROM GOTO MOUSE GOTO END :CMCD GOTO CDROM GOTO END :EM :XM :CM GOTO MOUSE GOTO END :CKB GOTO END :SOUND SET BLASTER=A220 I5 D1 H5 P330 T6 SET SOUND=C:\SB16 SET MIDI=SYNTH:1 MAP:E C:\SB16\DIAGNOSE /S C:\SB16\MIXERSET /P /Q :CDROM LH C:\DOS\MSCDEX.EXE /D:MSCD001 :MOUSE LH C:\DOS\MOUSE.COM :END CLS
Below screenshots are the end result. Other options that could be made are creating RAM disks, creating a list of your favourite games, starting batch files, and so on.
Содержание
- Настройка файлов config и autoexec в windows 7 64
- Windows 95/98
- autoexec.bat
- config.sys
- MS FoxPro 2.x
- c:\fox\config.fp
- Windows ME
- Windows NT/2000
- Windows XP
- Windows 7
- MS-DOS
- autoexec.bat
- config.sys
- MS-DOS в сети
- Настройка файлов config и autoexec в windows 7 64
- 7. Редактирование CONFIG.SYS и AUTOEXEC.BAT
- Как вызвать команду msconfig и настроить Windows
- Использование команды msconfig
- Вкладки и возможности пользователя
- Вкладка «Общее»
- Опция «Загрузка»
- Использование вкладки «Службы»
- Метод «Автозагрузка»
Настройка файлов config и autoexec в windows 7 64
Не следует использовать программы кэширования дисковых операций типа Stacker, SmartDrive и пр., т.к. FoxPro имеет свой модуль кэширования. Возможны конфликты между ними. Кроме того, происходит неоправданный расход памяти.
MS FoxPro поставляется в двух видах — стандартный (foxpro.exe, foxpro.ovl) и расширенный (foxproX.exe). Используйте «расширенную» версию FoxPro только при наличии достаточного объема памяти на вашей машине (не менее 4 МБ, с драйвером emm386.exe).
«Тяжелым» моментом для FoxPro является запуск внешних программ, таких как архиваторы, просмотрщики. Если программа не запускается, попробуйте сменить тип FoxPro — перейдите со стандартного на расширенный и наоборот. Очень помогает в тех случаях, когда необходимо несколько раз подряд выполнить запуск внешней программы (например, формирование формы 8-ДР, передача в «налогоплательщик», сведения для персонифицированного учета).
Windows 95/98
Использование графических оболочек типа Windows 9x совместно с нашим программным обеспечением можно рекомендовать опытным пользователям. Запуск монитора задач лучше выполнять из bat-файла, помещенного на Рабочем Столе (Desktop) или из любого унаследованного файлового менеджера (Norton/Volkov Commander, DOS Navigator). Ни в коем случае не нужно использовать драйвер верхней памяти emm386.exe(sys), т.к. Windows управляет ею с помощью своего менеджера памяти.
autoexec.bat
config.sys
MS FoxPro 2.x
Возможно использование любой версии FoxPro старшей 2.0, но для работы с некоторыми задачами необходимо обязательное использование версии 2.6. При установке FoxPro помещается в отдельном каталоге на локальном диске, например в c:\foxpro\.
Обратите внимание на необходимость указания диска для временных файлов (параметр tmpfiles конфигурационного файла) при работе с сетевой версией программ. Он всегда должен быть назначен на один из локальных дисков вашего компьютера.
c:\fox\config.fp
Попробуйте также добавить еще и такие строки в этой файл. В качестве путей укажите свой:
Windows ME
Запустите утилиту msconfig и в разделе config.sys добавьте строку FILES=50 или отредактируйте существующее значение. Данная рекомендация взята из Tech & Support самой Microsoft, но ни к какому положительному результатам не приводит. Мне так и не удалось запустить нашу «зарплату». Все остальное работает. Может быть Вам повезет больше и все будет работать. В противном случае, остается «откатиться» и пользоваться версией, которая стояла до этого.
Windows NT/2000
Общепринятым методом запуска программ MS-DOS является добавление ключа в реестр или редактирование существующего его значения. Уточняется. При необходимости нужные конфигурационные файлы (autoexec.bat и config.sys) переименовываются и устанавливаются для использования только этой программой MS-DOS.
Откорректируйте файлы autoexec.nt и config.nt следующим образом:
в файл autoexec.nt нужно добавить строки в файл config.nt нужно добавить строки
Также необходимо удостовериться в корректном состоянии переменных окружения TEMP и TMP, которые должны содержать путь к каталогу на локальном диске, в котором будут сохраняться временные файлы. Постарайтесь сделать этот путь как можно более коротким.
Использование NT/2000 в качестве файлового сервера для наших программ возможно и тому есть удачные примеры. Много будет зависеть от наличия грамотного администратора, который будет заниматься установкой и обслуживанием сервера.
Windows XP
Все наше ПО отлично работает в окружении этой передовой ОС. Нет никаких оснований «хоронить» DOS и программы, работающие «под» ним. Настройка и конфигурирование выполняются абсолютно аналогично Windows 2000.
Windows 7
Все наше ПО отлично работает в окружении этой передовой ОС. Нет никаких оснований «хоронить» DOS и программы, работающие «под» ним. Настройка и конфигурирование выполняются абсолютно аналогично Windows 2000.
MS-DOS
Приведенная конфигурация файлов позволяет получить около 600 КБ свободной памяти, и этого с избытком хватает для работы наших программ. Обратите внимание на необходимость загрузки драйверов himem.sys и emm386.exe. Их использование позволяет задействовать всю имеющуюся на машине оперативную память. Не увеличивайте без крайней необходимости количество выделяемых буферов и файлов, это приводит к неоправданному расходованию памяти.
Оптимальная конфигурация распределения памяти может быть получена при использовании программы memmaker, которая входит в комплект поставки MS-DOS, начиная с версии 5.0.
autoexec.bat
config.sys
MS-DOS в сети
Основным моментом является необходимость загрузки используемых драйверов сети в верхнюю память. Это позволяет высвободить основную память для работы наших программ. Приведенная конфигурация файлов позволяет получить около 570 КБ свободной памяти для MS-DOS версии 6.22 при работе с сервером Novell Netware. © Базис, 18 ноября 1999 года
обновлено 22 марта 2013 года
Источник
Настройка файлов config и autoexec в windows 7 64
Наилучшее использование файлов CONFIG.SYS и AUTOEXEC.BAT
Наилучшее использование файла CONFIG.SYS
При включении компьютера его встроенные программы выполняют внутреннюю диагностику и загружают часть DOS, которая затем ищет в корневом каталоге загрузочного диска файл с именем CONFIG.SYS. Если файл найден, то он используется для настройки системы и загрузки полной версии DOS, если же нет (возможно, из-за того, что вы его случайно уничтожили =), компьютер загружает DOS в конфигурации, заданной по умолчанию, и не устанавливает никаких дополнительных драйверов. То же самое произойдёт, если вы дадите DOS указание проигнорировать CONFIG.SYS (смотрите «Режимы начальной загрузки»).
Прежде чем пытаться что-либо усовершенствовать, необходимо принять меры предосторожности — создать резервную загрузочную дискету. Всякий раз, когда вы изменяете файл конфигурации или запускаете вносящую изменения программу инсталляции, вы рискуете сделать невозможной загрузку с жёсткого диска. Если это произойдёт, загрузочная дискета поможет вам снова запустить систему.
Возьмите чистую дискету и сформатируйте её командой FORMAT A: /S (т.е. с копированием системных файлов DOS). Затем проверьте, имеется ли на дискете файл COMMAND.COM, и попробуйте с неё загрузиться. Убедившись, что загрузка происходит нормально, пометьте дискету, как «Системная». Теперь можно начинать.
Режимы начальной загрузки.
В MS-DOS 6.x введён ряд новых функций, позволяющих избежать неудобств при настройке файла CONFIG.SYS. Когда на экране появляется сообщение «Запускается MS-DOS…» (Now starting MS-DOS…), вы можете нажатием клавиши запретить выполнение файла config.sys, после чего DOS загрузится в стандартной конфигурации. Это пригодится вам, если в config.sys окажется ошибка, не дающая системе загрузиться. Хотя и существует загрузочная дискета, таким способом можно решить многие проблемы, связанные с загрузкой. Нажав вы запустите config.sys (а в DOS 6.2 также autoexec.bat) в пошаговом режиме, где сможете для каждой строки выбирать, выполнить её или проигнорировать, а пройдя интересующие вас строки, дать команду выполнить или пропустить всё оставшееся. Если вам захочется узнать, какая строка вызывает ошибку, то загрузившись с , просто подтверждайте выполнение всех строк подряд, пока не возникнет ошибка. Команда REM и точка с запятой удобны, когда нужно снабдить config.sys комментарием, объясняющим, например, зачем добавлена такая-то строка или изменён такой-то параметр:
Но чаще они служат для временного отключения строки при отработке разных вариантов файла. Гораздо проще набрать перед началом строки «REM», чем удалять её, а впоследствии, если потребуется восстановить прежний вариант, набирать заново.
И, наконец, в MS-DOS 6.х появилась возможность создавать красочные меню конфигураций и задавать установки по умолчанию для случая, когда при загрузке никто не присутствует, — они будут использованы, если по прошествии определённого времени выбор не произойдёт.
[COMMON] — определяет блок команд config.sys, выполняемый во всех вариантах выбора.
INCLUDE — позволяет включить один блок меню в другой и избежать таким образом повторяющихся блоков.
MENUCOLOR — определяет цвет текста и фона меню.
MENUDEFAULT — указывает пункт меню, используемый по умолчанию, и задаёт время ожидания.
MENUITEM — задаёт для пункта меню внутреннее имя и текст, выводимый на экран.
SUBMENU — позволяет создать подменю для определённого пункта меню.
Когда вы выбираете пункт меню config.sys, его имя передаётся в файл autoexec.bat через переменную окружения, называемую CONFIG. Если, например, в меню были два пункта — DOS и WINDOWS, файл autoexec.bat можно начать с команды GOTO %CONFIG%, которая вызовет переход на одну из двух меток — :DOS или :WINDOWS.
Файл config.sys с многовариантной настройкой имеет следующий вид:
Соответствующий файл autoexec.bat должен выглядеть таким образом:
Выполнение файла config.sys, приведённого выше, начинается с выключения клавиши и установки синего цвета букв на белом фоне экрана. В качестве варианта по умолчанию выбирается DOS, время ожидания устанавливается в 60 секунд. На экране пункты меню выглядят как:
- Конфигурация DOS
- Конфигурация Windows
Внутренние имена их — DOS и WIN. Файл состоит из четырёх секций. Можно создать и пятую (точнее, нулевую), поместив какие-нибудь команды выше строки [MENU] — они будут выполнены до того, как меню появится на экране.
Лучше всего, продемонстрировать вам имеющиеся файлы config.sys и autoexec.bat…
rem Пример файла CONFIG.SYS
REM Описание дисковода CD-ROM (нижняя строчка)
DEVICEHIGH /L:1=\CPQDOS\CPQIDECD.SYS /D:IDECD001
[COMMON]
device=c:\windows\COMMAND\display.sys con=(ega,,1)
Country=007,866,c:\windows\COMMAND\country.sys
device=c:\windows\cs4232c.exe /A
rem Пример файла AUTOEXEC.BAT
@SET DN=C:\DN\
@PATH c:\windows;c:\windows\COMMAND;C:\DN
@SET TEMP=C:\DN
@ECHO OFF
SET BLASTER=A220 I5 D1 T4
GOTO %config%
:DOS
rem Описание дисковода CD-ROM(нижние две строчки)
SET FIXP=E:
LH \CPQDOS\MSCDEX.EXE /D:IDECD001 /L:E
LH C:\WINDOWS\COMMAND\DOSKEY
C:\MOUSE\MOUSE.COM /L=GB
LH MKEY.COM
C:\DN\DN.COM
GOTO DONE
:WIN
LH MKEY.COM
GOTO DONE
:DONE
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%PATH%
mode con codepage prepare=((866) c:\windows\COMMAND\ega3.cpi)
mode con codepage select=866
Данное описание относится к MS-DOS 6.x, так что если у Вас более ранняя версия, следует уточнить по предстовляемому справочнику, какие команды Вам доступны .
Следующие команды можно использовать только в Config.sys:
BUFFERS=m[,n] — устанавливает количество доступных DOS первичных (m) и вторичных (n) буферов. Когда Config.sys содержит команду DOS=HIGH, буферы загружаются в HMA. Если Вы пользуетесь программой кэширования диска (к примеру — SmartDrive), задайте небольшое количество первичных буферов и не пользуйтесь вторичными. Значение m, устанавливаемое по умолчанию, зависит от объёма памяти и ёмкости жёстких дисков компьютера (n по умолчанию равно нулю).
COUNTRY=xxx[,yyy][, ] — предписывает DOS использовать набор символов, а также форматы вывода времени, даты, принятые в какой-либо стране. (ххх — это трёхзначный код страны [совпадает с телефонным кодом], yyy — это номер соответствующей кодовой страницы [набора символов], — имя файла, содержащего информацию о стране [по умолчанию Country.sys]).
DEVICE= — загружает в обычную память драйвер устройства и инициализирует его.
DEVICEHIGH=[/L[/S]] — загружает драйвер устройства в верхнюю память (UMB) и инициализирует его. Если драйвер не помещается в UMB, команда действует так же, как и команда DEVICE=. Переключатели /L и /S помогают оптимизировать память.
DOS=[HIGH|LOW][UMB|NOUMB] — определяет, необходимо ли DOS загрузить часть своего кода в HMA (ДА — HIGH, НЕТ — LOW) и поддерживать свзь с верхней памятью (ДА — UMB, НЕТ — NOUMB).
DRIVPARM — устанавливает параметры дисковода либо другого аналогичного устройства.
FCBS=n — устанавливает число блоков управления файлами, которые могут быть открыты одновременно. Обычно n — от 1 до 255. По умолчанию ставится — 4.
FILES=n — устанавливат число файлов, которые могут быть открыты одновременно.
INSTALL= — загружает резидентную программу при выполнении Config.sys. Эти команды обрабатываются после того, как выполнятся команды DEVICE, и до загрузки Command.com.
LASTDRIVE=X — устанавливает максимальную разрешённую букву устройства. Обычно, по умолчанию, логическим устройством с максимальным номером является следующее за тем, которое последним нашла или создала DOS при загрузке компьютера.
NUMLOCK=[ON|OFF] — включает или выключает клавишу . Эта команда удобна в том случае, когда требуется управлять курсором с цифровой клавиатуры.
SHELL= [параметры] — определяет интерпретатор команд (обычно COMMAND.COM) и путь к нему. С помощью параметров можно указать стартовый файл, отличный от Autoexec.bat
Дальнейшие команды можно использовать в CONFIG.SYS и AUTOEXEC.BAT и в командной строке DOS:
BREAK=[ON|OFF] — при BREAK=ON проверка нажатия » + C» и » +
» происходит чаще, чем обычно. По умолчанию устанавливается BREAK=OFF. При использовании этой команды в AUTOEXEC.BAT и в командной строке DOS знак равенства необходимо опустить.
REM — указывает на то, что строка является комментарием и не выполняется. Слово REM с последующим пробелом, необходимо ставить в начало строки.
Давайте, прежде всего, разберёмся для чего же служит файл Autoexec.bat. В первую очередь, он позволяет загружать резидентные программы — всевозможные утилиты. Во-вторых, можно создавать и модифицировать вычислительную среду компьютера: например, заменить стандартный чёрно-белый экран DOS на цветной с помощью включённых в файл команд PROMPT и ECHO, упростить названия часто используемых подкаталогов, сообщить DOS, где искать Ваши любимые программы, и т.п. И в-третьих, Вы можете запустить из autoexec.bat одну либо несколько программ. Тем, кому не нравится работать с командной строкой, настраивают этот файл так, что он вводит их непосредственно в меню, оболочку с графическим интерфейсом (по типу DOS или Windows) либо в другую полюбившуюся прикладную программу…
Внимание: Как редактировать Autoexec.bat
Работая с файлом autoexec.bat, очень просто допустить ошибки. Но к счастью, ничего ужасного не произойдёт, если Вы допустите какую-нибудь промашку. Просто DOS выведет на экран соответствующее сообщение. Правда… Иногда ошибка приводит к тому, что Ваше любимое железо не может загрузиться! 🙂 В связи с этим, советую Вам, прежде чем приступать к видоизменению файла, сделайте себе резервную загрузочную дискету.
Какие бывают резидентные программы и какие из них понадобятся
В системе DOS 6.x шестнадцать резидентных программ. По крайней мере, так везде пишут 🙂
Одни из них полезны, другие совершенно устарели, а некоторые даже — опасны! Но я, к сожалению, знаком далеко не со всеми программами, вот некоторые из них:
Doskey.com — позволяет вызывать и редактировать в командной строке предыдущую команду DOS, а также создавать и использовать мощные макрокоманды. Обе эти возможности облегчают работу работу с командной строкой DOS, однако следите, чтобы буфер doskey не был слишком велик. Если Вы только редактируете команды, этот буфер может быть совсем маленьким, в том случае, когда макрокоманд много, следует буфер расширить.
MSCDEX.EXE — обеспечивают общую поддержку дисков CD-ROM. Перед тем как использовать эту программу, в файле config.sys следует установить драйвер дисковода CD-ROM.
SMARTDRV (SMARTDrive) — одна из немногих программ кэширования диска, способная при необходимости использовать память совместно с Windows. Кроме того, при наличии программы DoubleSpace она кэширует не сжатый диск, а главный, и в результате эффективность этой операции возрастает вдвое.
Источник
7. Редактирование CONFIG.SYS и AUTOEXEC.BAT
Редактирование CONFIG . SYS и AUTOEXEC . BAT
Для того чтобы исключить одну из строк из автозагрузки, не обязательно удалять ее, вполне достаточно написать в начале строки команду rem , кото рая означает начало комментария, игнорируемого при загрузке и исполь зуемого для справки. Например, если вы хотите пометить версию запускаемого драйвера (всего ведь не запомнишь).
Если в файле CONFIG . SYS явно не указана команда dos = noauto , в таком случае операционная система Windows по умолчанию загружает следующий «виртуальный» файл конфигурации:
DEVICE= С :\WINDOWS\HYMEM.SYS
Эти строки загружаются в память компьютера даже в том случае, когда файл вообще отсутствует.
Так же, как и в случае с CONFIG . SYS , существует «скрытый» файл AUTOEXEC . BAT :
PATH С :\WINDOWS; C:\WINDOWS\COMMAND
При наличии в корне системного диска файла DBLSPACE . BIN или DRVSPACE . BIN Windows загрузит соответствующий драйвер сжатых дис ков, даже если вы не используете эту функцию, поэтому не забудьте удалить эти файлы!
Многие пользователи часто замечали, что помимо основных файлов в корневом каталоге содержатся файлы AUTOEXEC . DOS и CONFIG . DOS , кото рые, по всей видимости, должны играть роль конфигурационных файлов при загрузке системы в режиме эмуляции MS — DOS , но это не совсем так. При перезагрузке компьютера в режиме эмуляции MS -‘ DOS в память компьютера совершенно считывается другой файл — C :\ WINDOWS \ dosstart . bat . Туда следует вписать все необходимые драйверы. Для загрузки тех драйве ров, которые запускаются при помощи файла CONFIG . SYS , рекомендуется воспользоваться программой CTLOAD , например:
C:\CREATIVE\DRV\CTLOAD C:\CREATIVE\DRV\SBIDE.SYS /D:MSCD001 /V/P:1FO,14
Эту программу можно найти на официальном сайте компании Creative по адресу: http :// www . europe . creative . com / techknow / tech / ftp / ftp — sbl 6 awe . asp .
В операционной системе Windows XP существуют аналоги файлов AUTOEXEC . BAT и CONFIG . SYS , применявшихся в семействе Windows 9 x . Эти файлы имеют названия AUTOEXEC . NT и CONFIG . NT и расположены в каталоге C :\ WINDOWS \ system 32\.
Содержимое файлов влияет на работу только тех программ, которые выпол няются в окне эмуляции MS — DOS , на работу самой графической оболочки никакого влияния они не оказывают. Через AUTOEXEC . NT можно настро ить использование ресурсов (порты ввода/вывода, прерывания IRQ , каналы DMA ). Значения, которые установлены по умолчанию строкой set blaster = a 220 is di рззо, соответствуют «традиционным значениям», которые считались стандартными для SB , и менять их. как правило, не при ходится. Причем совершенно не имеет значения, какие ресурсы реально использует ваша звуковая плата, при работе в окне эмуляции все порты яв ляются виртуальными. Также следует отметить, что при указании путей в AUTOEXEC . NT могут некорректно себя вести некоторые 16-разрядные приложения, поэтому рекомендуется все необходимые пути прописать в за кладке Переменные среды , которую можно открыть при запуске ярлыка Система | Панель управления и выбора закладки Дополнительно .
Примечание В операционной системе Windows 2000 имеется возможность добавления путей при помощи файла AUTOEXEC . BAT , находящегося в корне диска , коман дой PATH .
Источник
Как вызвать команду msconfig и настроить Windows
Если используется операционная система от Microsoft, то рано или поздно придётся столкнуться с командой msconfig. Не стоит её бояться, с её помощью можно сделать много полезного. Так, к примеру, можно разобраться с надоедливой автозагрузкой, которая снижает скорость загрузки, а также проверить компьютер на ошибки.
Использование команды msconfig
Самые частые варианты использования это:
- Когда во время установки Windows неотформатирован старый раздел на жёстком диске, где стоит предыдущая система, то во время загрузки просят выбрать версию операционной системы. В такие моменты на помощь придёт команда ms config. Она, конечно, не поможет удалить старую систему, но она решит проблему с запросом, возникающим при каждой новой загрузке операционной системы.
- Часто бывает такое, что время на загрузку компьютера стаёт невыносимо долгим. Открывается куча ненужных программ или браузеров, которые не нужны в данный момент. Это называется автозагрузка — программы, которые сами включаются во время запуска. Для пользователей Виндовс 7 — мс конфиг может помочь убрать всё ненужное из автозагрузки. Для пользователей же Windows 8 и выше это не нужно: меню автозагрузки вынесено в «Диспетчер устройств».
- Если на компьютере стоит операционная система Windows 8 и выше, то msconfig. exe — это самый простой способ загрузить Windows в «Безопасном режиме».
Можно, конечно, качать бесконечное количество утилит, которые могли бы справиться со всеми вышеперечисленными задачами, однако проще разобраться в одной-единственной команде.
Чтобы вызвать команду, нужно только знать, как пишется мсконфиг. Есть куча способов сделать это.
- К примеру, самый простой способ — это просто запустить меню «Пуск» и написать там msconfig и нажать Enter, после чего вас сразу же перекинет в окно этой утилиты.
- Если же вдруг по каким-то причинам невозможно открыть «Пуск», или по каким-то причинам прошлый способ не работает, то можно сделать это следующим образом. С помощью сочетания клавиш «Windows» + «R» зайти в «Выполнить» — msconfig
- Если по каким-то причинам оба предыдущих способов не работают, можно выполнить задачу через командную строку. Для этого в меню «Пуск» прописать cmd. exe, после чего в открывшемся окне прописать название команды.
Можно ещё открыть непосредственно через сам ярлык. Для этого нужно знать, где находится нужный файл. Найти его можно в «C:\Windows\System32», там и будет файл msconfigexe.
Вкладки и возможности пользователя
При открытии программы всплывет окно, в котором неопытному пользователю будет мало что понятно, поэтому нужно разбираться. Сразу видно вкладки: «Общее», «Загрузка», «Службы», «Автозагрузка», «Сервис».
Вкладка «Общее»
В данной вкладке можно выбрать один из вариантов запуска Windows, а именно:
- Обычный запуск — тут ничего объяснять не нужно.
- Диагностический запуск — при этом запуске загружаются только основные системные драйвера. Нужно это для диагностики, при неисправности системы и неопытным пользователям лучше сюда не лезть.
- Выборочный запуск — также чаще всего используется во время диагностики. Он позволяет загрузить систему с выбранными драйверами и приложениями автозагрузки, что помогает очень быстро найти проблему.
Опция «Загрузка»
Если стоит несколько операционных систем, то именно в этой вкладке можно настроить, какая будет загружаться по умолчанию. Просто в соответствующем окне выбрать нужную систему и нажать на кнопку «использовать по умолчанию». Помимо этого, можно зайти в настраиваемый «Безопасный режим», что очень пригодится пользователям Windows 8 и выше. Есть кнопка «Дополнительные параметры», где можно выставить число процессоров и ОЗУ, которое принимает участие в загрузке компьютера.
Использование вкладки «Службы»
В данной вкладке сразу появляется перечень непонятных названий. Всё это службы, которые использует система. В основном эта вкладка используется при неполадках с компьютером. По очереди включаются и отключаются службы, чтобы понять, какая именно вызывает проблему. Можно поставить флажок напротив фразы «Не отображать службы Майкрософт», чтобы увидеть посторонние службы, которые используют остальные программы. Но лучше совсем неопытным пользователям не трогать ничего, чтобы не понажимать лишнего.
Метод «Автозагрузка»
Эта вкладка является самой полезной для совершенно неопытных пользователей. Часто бывает такое, что во время запуска компьютера автоматически начитает включаться куча ненужных программ, которые, мало того, что все нужно закрывать, так это всё ещё и замедляет скорость загрузки системы. Открыв вкладку «Автозагрузка», перед вами сразу появляются программы и системы, которые загружаются вместе с Windows. Чаще всего они являются ненужными, поэтому смело можно выключать то, что не нужно. Главное — по ошибке не отключить элемент «Операционная система», всё остальное — пустяки.
Есть ещё вкладка «Сервис». Эта вкладка нужна только для того, чтобы быстро открывать настройки, администрирование, а также диагностику операционной системы, поэтому новичкам сюда лучше не заходить.
Даже неопытный пользователь способен разобраться в данной утилите и провести диагностику компьютера на ошибки, а также увеличить быстродействие за счёт отключения ненужных файлов автозагрузки.
Источник