Description of Restarting Computer in MS-DOS Mode

ID: Q138996


The information in this article applies to:
  • 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.

Starting a Program in MS-DOS Mode

When you double-click a program or shortcut configured to run in MS-DOS mode, the following items are performed. The items listed below assume that a new MS-DOS configuration has been specified.
  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.


  3. Windows restarts the computer.


  4. While the computer boots, Io.sys detects the presence of the Config.wos and Autoexec.wos files in the root folder of the boot drive and displays the following message:
    Windows 95 is now starting your 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:
    Press any key to continue...
    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.


  7. Windows restarts the computer.


  8. While Windows starts, the Config.app and Autoexec.app files are copied to the properties for the MS-DOS-based program you are running in MS-DOS mode or the properties for the shortcut that starts the MS-DOS- based program you are running in MS-DOS mode. If the Config.app and Autoexec.app files are accidentally deleted before this occurs, the custom Config.sys and Autoexec.bat files must be created again manually.


Defining Custom Config.sys and Autoexec.bat Files

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, follow these steps:
  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:

Q134400 General Tips for Using MS-DOS Mode

Keywords : kbenv win95
Version : 95
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: May 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.