//flex table opened by JP

Click to See Complete Forum and Search --> : Batch File


mirton
11-14-2001, 03:35 AM
I know this is simple question so excuse me for my ignorance. How do you get the window to close automatically when writing a batch file that is executed thru windows? What is the command line?

Thanx

scoots987
11-14-2001, 09:05 AM
Sorry I don't have the exact answer. But how are executing the batch file? Are you typing it out on the command line? Try creating a windows shortcut. That way you can control the batch file's return by setting the close checkbox in the shortcut.

Scoots987

LostBok
11-14-2001, 09:26 AM
Which, winNT and win2000 will close them automatically.... can't remember the line for win9x, I moved completely across to the NT based operating systems several years ago but I think any dos based command should work (try "exit") and then tick the "Close Window on Exit" in the shortcut properties...

mirton
11-14-2001, 01:38 PM
I found out that as long as you have echo off, you just type cls . If echo is on, it will just clear the screen but stay open. For some reason I wasn't able to get "exit" to work even though that is the standard way to close the dos boxes thru windows.

qball
11-15-2001, 07:59 PM
does depend on which winders version.

assume 98. To close a DOS box from a batch file, you need to suppress all screen output,'echo off' does fine. Then simply have

exit

at the point you want to close DOS box.

This functionality can be accomplished by a shortcut, as implied earlier, create shortcut to batch file, right click properties, program tab, check 'Close on Exit'.