0

ConEmu crashed on me whilst hosting a very long running robocopy command (it has already run for several days). Robocopy is still running in the background, I can see it listed in Task Manager and I don't want to kill it if possible. I want to be able to see robocopy's output.

ConEmu can attach to applications but when I try this it does not show any of the previously hosted processes, i.e. robocopy

Is there a way of reattaching to the robocopy process?

adejones
  • 960
  • 10
  • 11

1 Answers1

0

You haven't provided the "crash" message, so who can guess???

Most probably, your conhost.exe was crashed. Check this in TaskManager. If so, there is no more "console" and ConEmu can't attach anything.

Update

If the RealConsole is alive, you may try to ShowWindow on it. The window has ConsoleWindowClass window class name. I believe it's possible via PowerShell script, but I'm not sure how exactly.

Also, you may try to attach the RealConsole to ConEmu. The method may fail, if OS forbid ConEmu to attach the console.

  1. Run ConEmu.exe -detached
  2. Run (from Win+R) ConEmuC64.exe /ADMIN /ATTACH /CONPID=your-pid. Where your-pid is the process identifier of the running process. Is it cmd.exe or robocopy.exe?
Maximus
  • 10,751
  • 8
  • 47
  • 65
  • `conhost.exe` is still running – adejones Mar 21 '16 at 17:11
  • Maximus, just saw you are the author of ConEmu, thanks for making a great program. I use it daily. – adejones Mar 21 '16 at 17:21
  • What about processes `ConEmu*.exe`? – Maximus Mar 21 '16 at 19:22
  • ConEmu*.exe ended after an exception when I resized the ConEmu window. I know i should have copied the exception message but I was concerned about ending robocopy. I just want to know if there is any way of getting back to see the output. – adejones Mar 22 '16 at 07:56
  • When GUI process (ConEmu.exe) is ended unexpectedly, Server process (ConEmuC.exe) shows the RealConsole automatically. So, you have not provided some critical information. – Maximus Mar 22 '16 at 19:50
  • Well, two options were described. – Maximus Mar 22 '16 at 20:16
  • Thanks, I've updated to 160301 (had to manually uninstall 1401016) – adejones Mar 23 '16 at 11:13
  • Thanks Maximus, Neither option worked for me, sorry. I guess in this instance, on my machine, it does not work. I will accept the answer even though I cannot verify if this is the correct solution. I will continue to use your great program. – adejones Mar 23 '16 at 11:21