Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can one keep the cmd window open after an invokation a cli application with Autohotkey? I need to see the program's output, but it exits and causes the window to vanish.

share|improve this question

Instead of running directly your CLI application, run it through cmd with the -k parameter :

cmd /k <cli application>

/k will prevent the command prompt to close after starting the application.

share|improve this answer
+1, much cleaner than my suggestion. – Mike Fitzpatrick May 1 '10 at 0:23

You could invoke the application within a BAT or CMD script and follow it with the pause command which will wait for a keypress before exiting.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.