Keep cmd window open

broken image

I, at first, thought that 'cmd' was to be replaced by your command. You have to type (literally) 'cmd /k' followed by your command. Just to clarify something that took me a little bit to understand after reading these responses. How do I keep CMD open after the script is finished?ĭepending on how you are running the command, you can put /k after cmd to keep the window open. I believe that CMD assumes the script has finished, so it closes.

broken image
broken image

That will print out the ip info to the screen, but before the user can read that info CMD closes it's self. Keep CMD open after BAT file executes - batch-file I have a bat file like this: