Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ?

thanks

share|improve this question
    
What app are you using exactly? –  JNK Sep 9 '10 at 13:57
    
why ? is that relevant ? VTK –  Patrick 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. –  Patrick 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

2 Answers 2

up vote 1 down vote accepted

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.

fileToRun
pause

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...

share|improve this answer
    
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 ? –  Patrick 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. –  Patrick 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
    
yeah, great. Thanks this is the solution –  Patrick Sep 9 '10 at 14:49

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.

share|improve this answer
    
uhm, I'm just double-clicking on a file. The app is only running in terminal. –  Patrick Sep 9 '10 at 14:11

Your Answer

 
discard

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.