Prevent ConEMU from closing tab after last program exits

3

What I want is some way to click on ANY batch file from Explorer and see the output without writing a helper script to PAUSE it afterwards.


This is a question which seems likely to generate more OT answers than it should (judging by similar questions people have asked). To minimize that I've created a short list of questions I'm not asking:

  • First, I DO NOT want to know how to use the PAUSE command or anything like it. I'm not looking for a way to modify every batch file on my system now and into the future.

  • Second, I DO NOT want to enable the Confirm tab closing option in ConEMU. By experimentation, I've found that this option does not seem to apply to batch files ran by clicking on them anyway.

  • Third, I DO NOT want to modify the way batch files are handled by programs other than ConEMU. I don't want to create a situation where scripts ran in a non interactive shell are stalled and left open. IOW, I need to ensure that other applications which launch batch files are handled normally. I only want to modify how they are handled when clicked in an interactive shell.

Some things I've tried:

  • ConEmu does apparently support logging (in the Features section) of the console. This is great but it is really only a backup plan. I'd rather not have to open another file to show me what was just on my screen for 0.1 sec.

  • ConEmu has an App Distinct section in it's settings which looks like it could almost be setup to handle *.bat files using special rules but I cannot see anything which allows what I need.

  • ConEmu has an ComSpec section in it's settings which looks like it could do this as well (using cmd.exe /k I presume) but nothing I've tried has had any effect on this and now I'm starting to think that all of those notes in the tool tips about what those options are specific to were serious (and so this will therefore never work for what I need now).


Bonus: If your solution will work with arbitrary exes as well that would be even better.

PS: Not sure why there are separate Batch and Batch-File tags. I've got space so I'll use both but someone may want to fix that.

krowe2

Posted 2014-11-20T21:15:36.127

Reputation: 656

Answers

3

click on ANY batch file and see the output

Click where? Have you enabled DefaultTerminal feature? It has a confirm option.

DefTerm options

Maximus

Posted 2014-11-20T21:15:36.127

Reputation: 19 395

I would like to be able to click the icon in Explorer to do this. Yes, I have enabled the Default Terminal option. I have also enabled 'Aggressive Mode' and 'Register on OS start up' and 'Use existing ...' options. The text box has 'explorer.exe' and everything else on that page is disabled. – krowe2 – 2014-11-20T21:57:35.597

"Everything else" is enabled of course as on screenshot. – Maximus – 2014-11-20T22:02:56.587

That did it of course. Thanks. Not sure how I missed that. Even after you had me look at the setting page it didn't click. – krowe2 – 2014-11-20T22:08:02.453