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

ID: Q141308


The information in this article applies to:


SUMMARY

This article describes how to run commands automatically when you use the "Restart the computer in MS-DOS mode" or "Restart 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" or "Restart 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:


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


    2. In the Shut Down Windows dialog box, click "Restart the computer in MS-DOS mode", and then click Yes.


    3. At the command prompt, type exit, 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 mode configuration, the specified Config.sys and Autoexec.bat files are processed and the Dosstart.bat file is not processed. If you use the current MS-DOS configuration, the current Config.sys and Autoexec.bat files are processed, and then the commands in the Dosstart.bat file are run.

Additional query words:


Keywords          : kbenv win95 win98 
Version           : 95
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: January 26, 1999