1

I am running a batch file from ConEmu and want it to be as little intrusive as possible. I have set ConEmu to run minimized and close on exit. But.. after the batch is run, the window stays open and displays

ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

Command line is (I already tried variations with and without extra cmd.exe, /c and /k switches):

C:\Tools\ConEmuPack.160403a\ConEmu64.exe /Exit /cmd cmd.exe /c C:\Users\test\Desktop\rdp_logout.bat

How can ConEmu window automatically close when batch file is done running?

3

It's all in docs. Just add -cur_console:n switch at the end.

  • It's not working for me. I also changed from latest alpha to stable. But it fails, command window stays open. C:\Tools\ConEmuPack.150813g\ConEmu64.exe /cmd cmd.exe /c C:\Users\test\Desktop\rdp_logout.bat /cur_console:n Same with /Exit switch I tried first. Maybe it has something to do with it running in admin mode on my machine (UAC disabled)? – Andreas Reiff Apr 5 '16 at 11:52
  • This seems to do the job: C:\Tools\ConEmuPack.150813g\ConEmu64.exe -Min /cmd cmd.exe -new_console:n /c C:\Users\test\Desktop\rdp_logout.bat – Andreas Reiff Apr 5 '16 at 12:30
  • If you use the switch exactly as I've suggested, it would be working properly! – Maximus Apr 5 '16 at 17:38
  • You are correct. I guess I made copy/paste error. – Andreas Reiff Apr 6 '16 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.