Stop CMD from closing: automatically, after running program

Stop CMD from closing: automatically, after running program

If you have noticed that your command prompt often automatically shuts down, you may find this annoying or even worrisome. This FAQ will show you how to prevent this from happening.

To prevent the Command Prompt from closing automatically:

  • Press Windows key + R to open the Run window.
  • Launch the command prompt by typing
     cmd /K
  • Adding / K after the command keeps the window open. You can, then, close the window manually when you no longer need it to be open.
Need more help with Windows? Check out our forum!
Around the same subject

Windows