AUTOEXEC is designed to replace the AUTOEXEC.BAT that probably already exists on your drive C:. This file is used by DOS to configure the computer as it boots; DOS then hands control of the computer over to Windows, which proceeds to start. By altering the AUTOEXEC, much finer control over the boot process can be achieved.
This AUTOEXEC uses the opportunity to test the computer for various faults, summarise the detected configuration, delete tempfiles, histories and cookies, scan for viruses, optionally abort boot, and log the entire process to diskfile.
This AUTOEXEC performs the following functions:
- configures DOS environment (memory, PATH, PROMPT, DIRCMD, environment variables)
- creates a logfile of all boot activity, including a summary of previous boot-time events
- displays an urgent system notice, waits for keypress (if present)
- displays a custom system notice, does not wait for keypress (if present)
- option to check file system with selected tool
- checks date for 2xxx, checks BOOTGUI=0, LOGO=0 in MSDOS.SYS
- option to fix any of the above, and reboot
- checks SHELL=COMMAND, DOS=HIGH, DOS=UMB, HIMEM.SYS, EMM386.EXE in CONFIG.SYS
- option to fix any of the above, and reboot
- checks for DETLOG.TXT, DETLOG.OLD, IOS.LOG, ASD.LOG, BOOTLOG.TXT, BOOTLOG.PRV, NETLOG.TXT, SCANDISK.LOG in root
- summarises contents for each of the above; option to ignore, review, delete, abort boot
- checks for WININIT.INI in Windows directory, if found, displays contents; option to ignore, review, delete, abort boot
- option to delete temporary directories C:\WINDOWS\TEMP, C:\WINDOWS\TEMPOR~1, C:\WINDOWS\DOWNLO~1, C:\WINDOWS\MSDOWNLD.TMP, C:\WINDOWS\LOCALS~1\TEMPOR~1, any files starting with FFF and with an extension of TMP (created by a bug in Win98), any files starting with ~PST and with an extension of .TMP in the root of any drive (these files are tempfiles created by Photoshop), and any files ending in .TMP in the c:\WINDOWS\INTERNET LOGS directory (these are tempfiles created by ZoneAlarm)
- the above option can also delete a list of other items, such as the TEMP directory and recycle bins (by default, this is what will happen)
- option to freshen profile - delete from Windows directory the directories APPLOG, RECENT, COOKIES and HISTORY. Freshening them removes these directories and lets Windows recreate them. This flushes out droppings left behind by websites, and the recently used document list among other things
- the above option can also delete a list of other items, such as Netscape's COOKIE.TXT and NETSCAPE.HST and cache, and Opera's history, ad cache, and cache (by default, this is what will happen)
- option to scan for viruses using the selected tool
- start any arbitrary DOS commands
- get computername from registry
- lists important lines from CONFIG.SYS/AUTOEXEC.BAT
- get volume label, total disk space and free disk space for each drive
- get Windows version and swapfile information
- display summary of above
- option to boot to DOS (checks for and runs DOSSTART.BAT in Windows directory)
 
- requires Windows 95/98/98SE only - does not work with DOS, or Windows 3.x, ME, NT, 2000, or XP
- requires STAMP.EXE (included, licence-free)
- DOSSTART.BAT (supplied) prefers MOUSE.EXE or MOUSE.COM (not supplied - comes with mouse)
- the following points are this program's terms and conditions of use:
- This program is hereinafter known as "the Software".
- The Software comes with no warranty and is used at your own risk.
- The Software is not (and will never be) complete and as such may behave strangely.
- The Software is the copyrighted property of the author.
- The Software may be distributed freely.
- The Software may NOT be incorporated into a commercial work without prior written permission from the author.
- The Software is "donateware" - you can choose your amount, and pay with Paypal! Donating will encourage me to create more tools. If you do decide to donate, thankyou in advance; the form is here.
There is a feedback form here.
 
AUTOEXEC.BAT is a very important file, and messing with it is not a task to be taken lightly. There is no automagic install; you must know what you are doing.. sorry ;-)
- Run the self-extracting distribution archive. Files will be extracted into the directory you nominate.
- Ensure you have the following DOS programs somewhere in the PATH (they should be there already, as they come with Windows): CHOICE, DELTREE, FIND, ATTRIB, XCOPY, SORT, FC, MEM, EDIT, MSCDEX, MODE, SMARTDRV, DOSKEY, REGEDIT
- If it's not in your PATH already, copy the supplied STAMP.EXE to your C:\WINDOWS\COMMAND directory (or equivalent).
- Using a text editor such as Notepad, make any necessary changes to the supplied CONFIG.SYS and save it. The defaults work on most systems. Place a REM in front of commands you do NOT want to execute; remove any REM from the front of any command you DO want executed. If your Windows directory is not C:\WINDOWS, replace each occurence of the string "c:\windows" in the supplied CONFIG.SYS with the appropriate directory. Do not use a trailing backslash. Rename the existing CONFIG.SYS (in C:\) to CONFIG.OLD (or similar). Copy the edited version of the supplied CONFIG.SYS to C:\.
- Using a text editor such as Notepad, make any necessary changes to the supplied DOSSTART.BAT and save it. The defaults work on most systems. The editable area is delimited by begin/end markers. Again, place a REM in front of commands you do NOT want to execute; remove any REM from the front of any command you DO want executed. Rename the existing DOSSTART.BAT (in your Windows directory) to DOSSTART.OLD (or similar). Copy the edited version of the supplied DOSSTART.BAT to your Windows directory.
Note: If you see a CD-ROM error when DOSSTART runs (after you choose "exit to DOS" from Windows Shutdown, or if you select "boot to DOS" from AUTOEXEC before Windows starts), check that the CD-ROM devicename in CONFIG.SYS is OEMCD001 (this is the /D: parameter on the device driver command line). If you still see these errors after a reboot, check that you're using the correct CD-ROM driver, check there are no errors when it loads, and finally check the cabling and hardware.
- If you wish to use a mouse in DOS mode, locate your DOS mouse driver and place it in C:\WINDOWS\COMMAND (or equivalent). Rename it to MOUSE.COM or MOUSE.EXE if it is not called that already.
- Using a text editor such as Notepad, make any necessary changes to the supplied AUTOEXEC.BAT and save it. The defaults work on most systems. The editable area is delimited by begin/end markers. Again, place a REM in front of commands you do NOT want to execute; remove any REM from the front of any command you DO want executed.
If you are using a previous version of this AUTOEXEC.BAT, open it and copy the contents of each segment to the supplied AUTOEXEC.BAT.
If you are using a different AUTOEXEC.BAT, you need to merge it into the segments provided by the supplied AUTOEXEC.BAT. You should find that most of your AUTOEXEC.BAT is already covered.
Save your changes to the supplied AUTOEXEC.BAT. Rename any existing AUTOEXEC.BAT (in the root directory of drive C:) to AUTOEXEC.OLD (or similar). Copy the edited version of the supplied AUTOEXEC.BAT to the root directory of drive C: (C:\).
For details on the segments used to configure AUTOEXEC, see the configuration section.
- reboot, in order to effect changes
- follow onscreen prompts (if any)
Note: expect errors at first - AUTOEXEC will dig up all kinds of stuff, some of which may have accumulated over time. Once examined, delete any logfiles AUTOEXEC finds - if they come back, something was reconfigured, or there is a problem.
 
There are 7 segments of AUTOEXEC that can be configured. The segments are defined between lines such as these in the AUTOEXEC.BAT file:
rem --- begin [1] DOS SET statements/environment variables --- [1]
rem --- end [1] DOS SET statements/environment variables ---
Change the statements between the begin and end lines to suit your system. Statements can be enabled and disabled; turn a statement OFF by placing a REM in front of it. Turn a statement ON by removing any REM from the front of it.
segment 1: DOS environment variables
Ensure you retain the basic structure of the SET statements in this segment. The format of a SET statement is as follows:
SET variablename=variablevalue
where variablename is the name of the DOS environment variable to assign or change, and variablevalue is the value to load into the variable
Ensure the LOGFILE and TEMP settings are changed to reflect your system.
Ensure the CACHEPAR setting is changed to reflect your available hard disk drives.
Also ensure this section is changed to reflect the available virus scanner. Common viruscanner commandlines are below:
scanpm c:\*.* /clean /all /noexpire
scan c:\*.* /clean /all /noexpire
C:\PROGRA~1\NORTON~1\NAVDX.EXE /Startup
C:\PROGRA~1\Norton~1\norton~2\NAVDX.EXE /Startup
C:\PROGRA~1\NETWOR~1\DRSOLO~1\FINDVIRU.EXE C:\
Finally, segment 1 can be used to selectively disable some functions:
| setting | meaning |
| IGNOREBOOTGUI=yes | this skips the test for BOOTGUI=0 in MSDOS.SYS |
| IGNORELOGO=yes | this skips the test for LOGO=0 in MSDOS.SYS |
| SKIPFS=yes | this skips the file system test |
| SKIPSCAN=yes | this skips the virusscan |
| SKIPPROFILE=yes | this skips the freshening of the profile |
| SILENTMODE=yes | this causes all questions to be skipped, however all functions are executed |
segment 2: DOS PATH statements
If your PATH contains the entries C:\WINDOWS, C:\WINDOWS\COMMAND, %SYSTEM%, and/or %SYSTEM%\COMMAND, you can remove those parts of these entries. %SYSTEM% becomes C:\WINDOWS, or whatever your Windows directory is, when AUTOEXEC executes; it automatically determines this setting.
Ensure to separate each directory with a semicolon.
segment 3: file system check command lines
Drives listed in this segment are checked for errors when a file system check is initated.
Ensure this section is changed to reflect the available file system scanner. If unsure, use a SCANDISK entry.
Also, ensure this section is changed to reflect available drive letters.
Add or remove REM statements from this segment as required.
You can disable filesystem scanning altogether by setting SKIPFS=yes in segment 1.
segment 4: scratch directory list
Directories listed in this segment are deleted every reboot. Deleting your recycle bin every reboot will prevent you from recovering files once you have rebooted. But it means deleted files don't hang around. Also, if you use your recycle bin directory for other things (such as TEMP or cache dir), you'll need to flush it every now and then anyway. This approach minimises diskspace, supports the concentration of all tempfiles in one place, and enhances security. Windows recreates the recycle bin directory automatically, although it does not update its index (which means the bin may display a "full" icon when it is empty).
Note: this feature will defeat the crash protection in some programs, notably Microsoft Word. Word's AutoSave feature creates a tempfile with your work in it in the TEMP directory. If your machine crashes, Word may well have saved your work for you - but if you then reboot (as you probably will) and AUTOEXEC deletes your TEMP directory, the AutoSave recovery file will be lost. This is why there is an option to delete the scratch directories, presented during each boot. Ensure you select NO, don't delete scratch directories, if you wish to attempt to use an AutoSave feature after a crash. The selection will apply to the current boot only.
You can control which directories are deleted by AUTOEXEC by placing a REM in front of delete commands you DON'T want executed. You can also add any number of your own delete commands to this segment. You can achieve fine control over Recycle Bins, TEMP directories and browser caches by setting them to different directories and selectively removing them using delete commands placed in this segment.
Ensure this section is changed to reflect available drive letters.
Add or remove REM statements from this segment as required.
segment 5: profile directory list
Directories listed in this segment are deleted every reboot. Deleting your \WINDOWS\RECENT directory every reboot has the effect of removing all entries from the Documents folder on the Start Menu.
Deleting your Cookies every reboot will trash auto-authentication, cart settings, and various other stuff from websites. This is considered a small price to pay to obtain relative freedom from Doubleclick cookies, and their ilk. My policy on a website is if it insists on stored cookies, don't use it, it must be doing something dodgy with your personal profile. I happily "accept all cookies" -- because I know they'll last right up until I next reboot.
You can control which directories are deleted by AUTOEXEC by placing a REM in front of delete commands you DON'T want executed. You can also add any number of your own delete commands to this segment.
Add or remove REM statements from this segment as required.
You can disable profile freshening altogether by setting SKIPPROFILE=yes in segment 1.
segment 6: arbitrary DOS commands
Add or remove DOS commands (optional). Note that most common commands are not necessary due to either this AUTOEXEC, Windows, or DOSSTART.BAT. Do not use commands such as MOUSE, SHARE, SMARTDRV, or MSCDEX. These commands are DOS-mode only commands, and thus belong in DOSSTART.BAT. A sample DOSSTART.BAT is included (see below).
Common commands found in this segment include DOSKEY and MODE commands, as these settings are inherited by each DOS window, once Windows starts:
lh doskey > nul
mode con codepage prepare=((850) c:\windows\command\ega.cpi) > nul
mode con codepage select=850 > nul
lh keyb uk,,c:\windows\command\keyboard.sys > nul
segment 7: drive disk space list
Drives listed in this segment have their free space checked each reboot.
Ensure this section is changed to reflect available drive letters; ensure to edit BOTH entries for each drive.
Add or remove REM statements from this segment as required.
 
As the machine boots, it will ask questions. Critical errors cause the computer to wait for your response. Warnings are displayed with a timeout. Notices are simply displayed. Everything is logged. The boot will halt only if there is a critical error. Otherwise, it will pause momentarily for your choice. You can skip all questions by pressing A at the first question (Boot to DOS).
the logfile
- Check the logfile to see what occured during boot. The logfile is located in C:\ unless it has been reconfigured via the LOGFILE environment variable in segment 1.
- The logfile is regenerated each reboot, however, boot start and end times, and any errors, are preserved, and summarised in the 'previous boot summary' section.
- You can create a shortcut to the logfile on your desktop or Start Menu, or make a link to it from your intranet, or analyse it further with a management tool.
usage tips
- make your web browser use your recycle bin as its cache folder
- set your TEMP directory to the recycle bin also
- this AUTOEXEC will then clean your cache, your tempfiles and your recycle bin in one hit
- ensure this TEMP directory is on a fast, empty drive if possible
- if you want a quick boot to Windows without much delay, hold down N during boot. This will say NO to all questions and cause AUTOEXEC to skip most functions. The system is still checked for errors, however.
Note: If your machine crashes and you're using Word with AutoSave enabled, your document will be in your temp directory. This AUTOEXEC detects the AutoSave document and will skip deleting the scratch directories until all AutoSave documents (*.ASD) are removed from the temp directory manually.
Note: If WININIT.INI has been detected, the scratch directories will not be cleared. This is because some installation programs requiring a reboot after installation also require the use of some files in these temporary locations. Windows deletes WININIT.INI after processing it, therefore the scratch directories will be cleared the next reboot instead.
system notices
- if the file C:\URGENT.TXT exists when AUTOEXEC runs, it will be displayed onscreen, and also placed in the log. The boot process will pause until a key is pressed.
- to disable the urgent system notice, delete or rename C:\URGENT.TXT
- if the file C:\NOTICES.TXT exists when AUTOEXEC runs, it will be displayed onscreen, and also placed in the log. However the system will continue to boot - it does not wait for a keypress.
- to disable the system notice, delete or rename C:\NOTICES.TXT
 
- works with Windows 95/98/98SE only - does not work with DOS, or Windows 3.x/ME/NT/2000/XP
- complex to install
- if you already have a STAMP.BAT, STAMP.COM or STAMP.EXE on your system, strange things may happen when AUTOEXEC runs (what, exactly, will depend on which STAMPs are where). You should only have one STAMP, and it should be called STAMP.EXE (packaged with this help file).
 
- EXE-based installer/configuration/reconfiguration/uninstaller
 
| 1988 | 1.0 | initial development; the origins of this AUTOEXEC are shrouded in the mists of time...
| | 1989 - 1992 | 2.0 - 4.0 | basic implementation (including BBS support)
| | 1993 - 1995 | 5.0 - 7.0 | added file system check, viruscan support
| | 1996 | 8.0 | added basic Windows 95 support
| | 1997 | 9.0 | added prompts with timeouts
| | 1998 | 10.0 | added logging capability, profile freshening, Windows 98 support
| | 1999 | 11.0 | added system diagnosis features, system date check, HTML documentation
| | Jan 2000 | 11.1 | added system notices, improved system diagnosis features, system date check fix, bundled DOSSTART.BAT, CONFIG.SYS, STAMP.COM
| | Feb 2000 | 11.2 | streamlined output, added computername detection
| | Mar 2000 | 11.3 | bugfixes
| | Apr 2000 | 11.4 | improved system diagnosis features
| | Oct 2000 | 11.5 | improved viruscanner support; display of snippets and timezone info
| | Dec 2000 | 11.6 | added WININIT.INI support; added support for urgent system notices; added COPYCMD support; distributed as self-extracting EXE
| | Dec 2001 | 11.7 | bugfixes and cosmetic improvements
| | May 2002 | 11.8 | smaller, faster, nicer
| | Jun 2002 | 11.9 | added previous boot summary
| | Aug 2002 | 12.0 | improved WININIT.INI support; added SMARTDRV support
| | Jan 2003 | 12.1 | minor enhancements all round
| | May 2003 | 12.2 | added ability to skip all questions with a single keypress
| | Aug 2003 | 12.3 | added silent mode (skips all questions, executes all functions)
| | Dec 2003 | 12.4 | added AutoSave support; added ability to disable some functionality
| | Jul 2004 | 12.5 | added support for default Netscape and Opera cache directories; bugfix
| | Aug 2005 | 12.6 | added support for ACDSee image cache and the APPLOG directory; replaced STAMP.COM with STAMP.EXE; bugfixes
|
 
autoexec.exe  library
|