Prevent Command Prompt from closing automatically

If you have observed that command prompt closes automatically after it’s execution, this article explains you how to fix that.

I noticed it when i executed a batch file. It opened the command prompt, executed the commands and disappeared immediately after execution is completed.

Stop Command Prompt from closing automatically

Add /K after each command. This will keep the command prompt open.

Example: “cmd /k file.bat”

About the Author

SRINI S

A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published.