title: Running external process, waiting for the program to end, getting exitcode and keeping console open?
body: <p>I want to run a couple of programs one by one, but sometimes i want to keep their console window open to see the messages/errors </p>
  
  <p>Is there any possibility to run <code>cmd.exe /K anotherProgram.exe</code>, wait until anotherProgram is finished (<code>WaitForExit()</code>) and get anotherProgram's exitCode? Or maybe I can keep console open in other way than running it from <code>cmd /K</code>?</p>