Professional Documents
Culture Documents
Microsoft KB Archive - 138996 - Description of Restarting Computer in MS-DOS Mode
Microsoft KB Archive - 138996 - Description of Restarting Computer in MS-DOS Mode
php/Microsoft_KB_Archive/138996
Microsoft KB Archive/138996
< Microsoft KB Archive
Contents
1 Description of Restarting Computer in MS-DOS Mode
2 SUMMARY
3 MORE INFORMATION
3.1 Restarting the Computer in MS-DOS Mode
3.2 Starting a Program in MS-DOS Mode
3.3 Defining Custom Config.sys and Autoexec.bat Files
4 REFERENCES
Microsoft Windows 95
SUMMARY
This article describes the process that occurs when you restart your computer by choosing "Restart the computer in MS-DOS mode" in
the Shut Down Windows dialog box, or by double-clicking a program or shortcut configured to run in MS-DOS mode. This article also
describes how to define custom Config.sys and Autoexec.bat files to be processed when you restart your computer using the "Restart
the computer in MS-DOS mode" option.
MORE INFORMATION
Restarting the Computer in MS-DOS Mode
When you restart your computer by choosing the "Restart the computer in MS-DOS mode" option in the Shut Down Windows dialog
box, Windows closes all running programs, removes itself from memory, and then starts a real- mode command prompt. If the Use
Current MS-DOS Configuration option is selected in the "Exit to DOS.pif" file that is used to restart the computer in MS-DOS mode, the
Dosstart.bat file in the Windows folder is processed. If the Specify A New MS-DOS Configuration option is selected, the Config.sys and
Autoexec.bat files listed in the "Exit to DOS.pif" file are used instead of the Config.sys and Autoexec.bat files in the root folder.
To restart Windows normally after restarting the computer in MS-DOS mode, type exit at the command prompt and then press ENTER.
1. The Config.sys and Autoexec.bat files in the root folder of the boot drive are renamed to Config.wos and Autoexec.wos. If the
Config.sys or Autoexec.bat file does not exist in the root folder, a zero-byte Config.wos or Autoexec.wos file is created.
2. The custom Config.sys and Autoexec.bat files specified in the properties for the MS-DOS-based program you are running are copied
to the root folder of the boot drive. The first line in the Config.sys file is always:
dos=single
The last line in the Autoexec.bat file is always the following line
c:\<windows>\win.com /wx
where <windows> is the name of your Windows folder. The Autoexec.bat file also contains a CD statement that changes to the
folder that contains the MS-DOS-based program's files and a CALL statement that starts the MS-DOS-based program.
Press Esc now to cancel MS-DOS mode and restart Windows 95.
The above message is displayed for approximately three seconds. If you press the ESC key during this time, the MS-DOS-based
program you are running does not run and Windows 95 restarts normally instead. Note that the "Starting Windows 95" message is
not displayed when the above message is displayed.
5. If you do not press the ESC key while the above message is displayed, the Config.sys and Autoexec.bat files are processed. The CALL
statement in the Autoexec.bat file starts the MS-DOS-based program.
6. When you quit the MS-DOS-based program, the remainder of the Autoexec.bat file is processed, beginning with the line
immediately following the CALL statement. The line immediately following the CALL statement is normally the line that starts
Win.com.
The /WX switch causes Win.com to rename the current Config.sys and Autoexec.bat files to Config.app and Autoexec.app, restore
the original Config.sys and Autoexec.bat files from the Config.wos and Autoexec.wos files, delete the Config.wos and Autoexec.wos
files, and then reboot the system to Windows 95. Note that using the /WX switch instead of the /W switch prevents the following
message from appearing after these steps are performed:
If the Win.com line is removed from the Autoexec.bat file before you quit the MS-DOS-based program, or you attempt to start
Windows from the command prompt before the Win.com line in the Autoexec.bat file is processed, the following message is
displayed:
You are currently running in MS-DOS mode. Do you want to return to normal mode, to run Windows applications again?
NOTE: If the CALL statement in the Autoexec.bat file starts the MS-DOS command interpreter (Command.com), you must type exit
at a command prompt and then press ENTER to quit that instance of the command interpreter and allow the remainder of the
Autoexec.bat file to be processed. If the CALL statement starts a third-party command interpreter, you must type the appropriate
command to quit that instance of the third-party command interpreter.
1. If you have not restarted the computer in MS-DOS mode before, click Start, click Shut Down, click Restart The Computer In MS-DOS
Mode, and then click Yes. At the command prompt that appears, type exit and then press ENTER.
2. Click the Start button, point to Programs, and then click Windows Explorer.
3. Locate the "Exit to DOS.pif" file in the Windows folder, use the right mouse button to click the file, and then click Properties on the
menu that appears.
4. Click the Program tab, and then click Advanced.
5. Click Specify A New MS-DOS Configuration, define the custom Config.sys and Autoexec.bat files in the CONFIG.SYS For MS-DOS
Mode and AUTOEXEC.BAT For MS-DOS Mode boxes, and then click OK.
REFERENCES
For additional information about using MS-DOS mode in Windows 95 to run MS-DOS-based programs, please see the following article
in the Microsoft Knowledge Base: