How to Run Automatic Commands When Starting in MS-DOS Mode

Last reviewed: March 7, 1996
Article ID: Q141308
The information in this article applies to:
  • Microsoft Windows 95

SUMMARY

This article describes how to run commands automatically when you use the "Restart the computer in MS-DOS mode" option to restart your computer.

MORE INFORMATION

When you restart your computer in MS-DOS mode, any commands in the Dosstart.bat file are carried out. You can place commands you want to be run when you restart your computer in MS-DOS mode in the Dosstart.bat file. To do so, follow these steps:

  1. Start Notepad.

  2. Type the commands you want in the Dosstart.bat file in the empty Notepad file.

  3. On the File menu, click Save As.

  4. Save the file as Dosstart.bat in the Windows folder.

  5. Quit Notepad.

When you restart your computer using the "Restart the computer in MS-DOS mode" option, the "Exit to Dos" file is processed. If you want to use a different Config.sys or Autoexec.bat file for MS-DOS mode, modify the "Exit to Dos" file. To modify the "Exit to Dos" file, follow these steps:

  1. Use the right mouse button to click the "Exit to Dos" file in the Windows folder, and then click Properties on the menu that appears.

    NOTE: If the "Exit to Dos" file does not exist in the Windows folder, create it with the following steps, and then try step 1 again:

    a. Click the Start button, and then click Shut Down.

    b. In the Shut Down Windows dialog box, click "Restart the

          computer in MS-DOS mode," and then click Yes.
    

    c. At the command prompt, type "exit" (without quotation

          marks), and then press ENTER.
    

  2. On the Program tab, click Advanced.

  3. Click the Specify A New MS-DOS Configuration option.

  4. Enter the appropriate lines for the Config.sys file for MS-DOS mode in the Config.sys For MS-DOS Mode box.

  5. Enter the appropriate lines for the Autoexec.bat file for MS-DOS mode in the Autoexec.bat For MS-DOS Mode box.

  6. Click OK.

  7. Click OK.

If you "Specify a new MS-DOS configuration", then the specified Config.sys & Autoexec.bat files are processed & Dosstart.bat is not. If you "Use current MS-DOS configuration", the current Config.sys & Autoexec.bat files are processed, and then the commands in the Dosstart.bat file are run.


KBCategory: kbhowto
KBSubcategory: win95
Additional reference words: 95


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 7, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.