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 ?