AUTOEXEC.BAT
Encyclopedia : A : AU : AUT : AUTOEXEC.BAT
AUTOEXEC.BAT is the name of a system file found on the MS-DOS operating system. It is a plain-text batch file that is located in the root directory of the boot device.
Usage
AUTOEXEC.BAT is only used on MS-DOS or Microsoft Windows versions based on MS-DOS, such as Windows 3.x, Windows 95, Windows 98, and Windows Me. The file is executed once the operating system has booted and after the CONFIG.SYS file has been processed. On Windows, this occurs before the graphical environment has been started. Unlike CONFIG.SYS the commands in AUTOEXEC.BAT could be entered into a DOS prompt, they are just the commands that the computer user wants to be executed automatically whenever the computer is started.AUTOEXEC.BAT is most often used to set environment variables and run virus scanners, system enhancements, utilities, and driver handlers that must operate at the lowest level possible (for example real mode mouse or CD-ROM drivers on DOS computers). Applications that run within the Windows environment upon its loading are listed in the Windows registry.
Lines prefixed with the string "REM" are remarks and are not run as part of AUTOEXEC.BAT. The "REM" lines are used for comments or to disable drivers (say, for a CD-ROM). An alternative, though less common, method for commenting is using double colons (::).
Example AUTOEXEC.BAT File
@ECHO OFF REM =========================================================== REM This is the AUTOEXEC.BAT file. Be careful with your edits. REM If you have any problems let me know so I can help. REM REM -IT Guy, Murphy Stoffelis REM =========================================================== PATH=C:\WINDOWS;C:\WINDOWS\SYSTEM32\;C:\WINDOWS\COMMAND\;C:\ SET BLASTER=A220 I7 D1 T4 SET ULTRASND=240,3,3,5,5 SET ULTRADIR=C:\ULTRASND SET LMOUSE=C:\MOUSE ::That next command is not a good idea to do... Murphy REM DELTREE /Y C:\WINDOWS >NUL C:\MOUSE\MOUSE.EXE MSCDEX.EXE /D:123 ECHO Welcome to Microsoft Windows 98.
Windows NT
On Windows NT and its derivatives, Windows 2000 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 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" 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) or to keep the variables across a reinstall. This is an exotic usage today so this file remains almost always empty. The TweakUI applet from the PowerToys collection allows to control this feature (Parse Autoexec.bat at logon).
See also
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
