Results 1 to 5 of 5

Thread: How to exit a Windows MS-DOS window through a batch file.

  1. #1
    Join Date
    Nov 2009
    Posts
    67

    How to exit a Windows MS-DOS window through a batch file.

    Hello to all,
    I am new to this forum. As we know that we have to close Windows MS-DOS window after completing batch file. I want to exit a Windows MS-DOS window through a batch file? Can anyone tell me How to exit a Windows MS-DOS window through a batch file? Please help me.
    Thank you.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,522

    Re: How to exit a Windows MS-DOS window through a batch file.

    Hey as per my knowledge there is one method through which you can exit Windows MS-DOS window through a batch file.
    You have to just add "exit" command at the bottom of your batch file. The exit command is used to come out from the currently running application like MS-DOS session.
    You have to use following Syntax:

    Code:
    Quits the COMMAND.COM program (command interpreter).
    
    EXIT

  3. #3
    Join Date
    Apr 2008
    Posts
    3,295

    Re: How to exit a Windows MS-DOS window through a batch file.

    Hey I have use your following syntax, but I unable to do this. Can you you give me more information about exit command so that I can used it. If you can give me the example of it then also helpful.
    Code:
    Quits the COMMAND.COM program (command interpreter).
    
    EXIT

  4. #4
    Join Date
    Nov 2005
    Posts
    3,026

    Re: How to exit a Windows MS-DOS window through a batch file.

    Hey as per you request I have give following example of exit command. In the following example I have specified how it works.
    1.When you use exit command in the new command interpreter, then this command will exit you from this new command interpreter into origianal one.
    2.It helps you to return you into Windows , when you enter from the Windows to the DOS
    3.If it is in the recovery console then it will exit the recovery console and restart your computer.

  5. #5
    Join Date
    Nov 2005
    Posts
    1,203

    Re: How to exit a Windows MS-DOS window through a batch file.

    If you are using Windows 95, 98, ME, or NT then you can easily exit from the batch file by just creating shortcut of that batch file. You can do this in the following ways.
    1.First made the shortcut of the MS-DOS program or batch file.
    2.Now right- click on that shortcut and select Properties.
    3.Now open Programs tab.
    4.Now select "Close on exit."
    5.Now Click on Apply and press Ok.

Similar Threads

  1. How to run batch file hidden in dos window
    By Alfanumeric in forum Windows Software
    Replies: 6
    Last Post: 26-06-2011, 08:01 AM
  2. Shutdown window after running batch file
    By Jaiwanti in forum Operating Systems
    Replies: 4
    Last Post: 13-12-2010, 06:25 PM
  3. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  4. Exit code from a batch file?
    By Bhairav in forum Operating Systems
    Replies: 3
    Last Post: 17-02-2009, 05:38 PM
  5. Can We check the exit command in the batch file
    By Dhruv in forum Software Development
    Replies: 3
    Last Post: 30-12-2008, 11:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,950,785.89351 seconds with 17 queries