Stop the Command Prompt from Automatically Closing

January 2018

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.

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.

quka - Shutterstock.com
Published by jak58. Latest update on January 11, 2018 at 11:54 AM by AydanCCM.
This document, titled "Stop the Command Prompt from Automatically Closing," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).
Sndvol32.exe missing or corrupted
Downgrade from Windows Vista to XP (HDD S-ATA not recognized)