0

I successfully use ConEmu to start different instances of a command line application MYAPP in different tabs. E.g. by predefined task cmd /k MYAPP Tab1 -new_console:t:MyAppTitle ...

To monitor an instance of MYAPP, the ConEmu task no longer directly starts MYAPP, but instead starts a Powershell script, which then in turn starts an instance of MYAPP (PS command start-process). The reason is that the script contains some logic to kill or restart MYAPP depending on certain conditions.

The problem: ConEmu will now hook and redirect the Powershell output (that's fine), but the MYAPP output will no longer be redirected to the corresponding ConEmu tab. Instead start-process spawns the new processes in additional standard command windows, popping up, which destroys the screen ordering scheme introduced with ConEmu.

I can also see with ProcessMonitor that conemuhk.dll is no longer injected into MYAPP, but into the powershell process.

This is what one would expect, however I would like to see the MYAPP output in the same ConEmu Tab, in which the corresponding Powershell script was started first.

So may be the more general question is: Is it possible with ConEmu not only to redirect the output of a child process, but also that of the grandchild process into the same Conemu window/tab ?

1 Answer 1

0

You have not shown exact command from your script and your task contents. You haven't said what is your MYAPP. Especially, is it GUI or CUI. You haven't shown the version of ConEmu and OS. Also, no screenshots were attached.

Without this critical information I can only guess that you use Start-Process improperly.

Example:

start-process cmd -nonewwindow -wait
1
  • For completeness,- MYAPP is a CUI application which does not do much more than sequential console output. Indeed I did not use start-process correctly, so the -NoNewWindow parameter did solve my problem perfectly and output now is shown in the same ConEmu Tab.
    – rodims
    Commented Apr 5, 2016 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .