1.

Solve : Closing a dos wndow?

Answer»

[size=16]how to close a dos window running through a batch file automatically?

I have given the "exit" command... but still the window does not close.

the commands I gave in the batch file were this:

start c:\windows\desktop\document.doc
exit

and the command shown at the dos window is this:

c:\>start c:\windows\desktop\document.doc

c:\>Exit


After running the Exit command , the dos wondow remains there ,without closing[/size]Probably something LEFT over from the EARLY days of DOS. When the ms-dos prompt (command.com) is started, it's considered a first level processor. When an EXIT in a batch file is encountered there is simply no OS to return to and the EXIT is ignored. You can however manually TYPE EXIT at the prompt to close the window (go figure!:-/).

This does not apply to the command prompt (cmd.exe FOUND on NT MACHINES). A CMD window will behave as you would expect.



Discussion

No Comment Found