Question:

How do I prevent Windows Command Prompt from closing automatically?

by Guest64659  |  earlier

0 LIKES UnLike

When doing any number of tasks that run the command prompt from outside of an existing command prompt window, I need to restrict new windows from closing automatically. I have seen this done, where new command prompts that have finished processing will print "Press any key to continue" and wait for a keystroke before closing the window. Is there any way to set this up on Windows XP?

Please don't suggest using /k, or compiler tricks to force a persistent window. Those only work when they are deliberately used. I need something that is permanent. I have a feeling that such an alteration would require a trip to the Registry. I'm not touching that until someone tells me what to look for and how to achieve the results I'm looking for.

 Tags:

   Report

1 ANSWERS


  1. If I recall correctly, while it's possible to change some aspects of the command prompt's behavior in the registry, forcing it to wait for input before closing is not possible.

    Those "press any key to continue" prompts are created from the programs/scripts themselves, not CMD.  You would have to rewrite every program to include that prompt to achieve what you want to do.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.