I'm using a terminal application in Windows XP.

I set it as favorite application for files with a specific extension.

So now when I click on a file, the terminal opens to run the application.

However when the app crashes the terminal automatically closes and I cannot see the error.

Is there any way to keep the terminal open as if I would have launch the app from terminal ?


  • What app are you using exactly? – JNK Sep 9 '10 at 13:57
  • why ? is that relevant ? VTK – aneuryzm Sep 9 '10 at 14:12
  • Well, I suppose the software might have an option for this, and that should be the first thing to check for. – DMA57361 Sep 9 '10 at 14:13
  • well if I run it from terminal, obviously I don't have such issue. The software doesn't automatically closes, so the software is fine. – aneuryzm Sep 9 '10 at 14:16
  • 2
    Apparently not, but I don't know the software in question myself, so can't really comment. But personally I think every "unknown" factor of a problem makes it generally harder to answer, so any question that helps make the question more precise is generally useful. – DMA57361 Sep 9 '10 at 14:48

Usually if I want to double-click a terminal EXE and not miss the result, I will build a simple batch file in the same folder to double-click.


It runs the requested file and then you get a please press any key to continue after the program terminates (successfully or in error) to allow you to determine when to close the terminal.

Or, if you don't want to have to always manually close your terminal windows, you can configure your batch to dump the output to a file instead - that way you have easy access to all of the output after a crash. You do this like so (note that a 2nd run of the program will overwrite the file of a previous run).

fileToRun > fileToRunLOG.txt

In your case, create the batch file (adding a %1 after fileToRun to handle the file argument!) and then associate the file type with the batch, not the main executable. Done.

This might be a bit indirect, but I've just come up with it, so you may wish to wait for some better suggestions...

  • I got it. But I cannot do it, and it is a long story. Shortly, I'm using VMWare to emulate Windows and I'm opening files from the underlying Operating System (Sharing folders). This only works from GUI and not from terminal. Is it clear ? – aneuryzm Sep 9 '10 at 14:26
  • So, in other terms, if I create a batch file, I have the same issue.. I have to specify both app to use and file to open into the batch file and it doesn't work because the file cannot be found. – aneuryzm Sep 9 '10 at 14:27
  • 1
    Did you use the %1 argument specifier in your batch - eg fileToRun %1 - to pass the argument given to the batch (ie the file you clicked on) on to the given program? If so, then I'm afraid I can't help much further as I've no idea how VMWare handles it's shared folders in this kind of setup. – DMA57361 Sep 9 '10 at 14:35

Are you referring to the CMD.EXE shell or a terminal like PuTTY?

If you're using CMD.EXE, you can use the /K option to keep the window open after the command has completed.

  • uhm, I'm just double-clicking on a file. The app is only running in terminal. – aneuryzm Sep 9 '10 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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