Command Prompt Window

  • Thread starter Thread starter glitch007
  • Start date Start date
G

glitch007

In windows 98, I could uncheck the close on exit box, but
how do you make the command prompt stay open after it
exits for win xp?
 
In windows 98, I could uncheck the close on exit box,
but
how do you make the command prompt stay open after it
exits for win xp?

Try this:

CMD /K myprogram.exe

where myprogram.exe is your DOS program file or BAT
file. The /K option will leave the DOS window open. For
example, create a BAT file with Notepad on your desktop
with the following entries:

CMD /K dir

Save the file with the name DIR.BAT. When you double-
click this desktop icon, it will run DIR in a command
window and leave the window open.

Conversely, replace the /K with a /C, and the window will
immediately close after execution of the DIR command.

HTH

Reed Rinn
MS MVP
 
Back
Top