command prompt

  • Thread starter Thread starter stewart
  • Start date Start date
S

stewart

anybody know how to disable closing the command prompt
window (like during execution of a batch (*.bat) script
file)??

thanks stewart
 
stewart said:
anybody know how to disable closing the command prompt
window (like during execution of a batch (*.bat) script
file)??

Simple way: put
PAUSE
at the end of the batch file.
 
i don't want it to pause at the end of the script, i
simply want it to close. i don't want a user to be able
to close the command prompt window WHILE the batch is
running, when the batch completes, i WANT the window to
close. in my particular case, i am running the batch
from a login script, it will run for several minutes, i
don't want a user to be able to close it.

stewart
 
stewart said:
anybody know how to disable closing the command prompt
window (like during execution of a batch (*.bat) script
file)??

thanks stewart
Unless I misunderstood your question, the answer is simple: in the
properties windows, do not check "close on exit".
 
stewart said:
i don't want a user to be able
to close the command prompt window WHILE the batch is
running, when the batch completes, i WANT the window to
close.

This cannot be done with Windows. Maybe some add-on software provides
this, but I have not seen such a tool.
 
Durand said:
Just add "exit" to the end of the batch file and it will close
automatically.

I do not think that this is the problem, because he wrote that he does
not want anyone to close the batch _while it runs_ and it already
closes when it has been finished.
There is no way to do this in Windows as far as I know.
 
He wasn't clear but he did state that he wanted it to close after it
was done. That's why I made my suggestion. As for preventing it while
it's running, I don't know of a way to prevent the batch file from
being closed while it's running either, but perhaps he could make a
shortcut to the batch file and run it minimized so the users don't
notice it running in the background?
 
Back
Top