I have a C# console application (A). I want to execute other console app (B) from within app A (in synchronous manner) in such way that B uses the same command window. When
I was able to run the program 'B' as part of the same command window by calling the following configuration:
ConsoleColor color = Console.ForegroundColor;
ProcessStartInfo startinfo = new ProcessStartInfo(nameProgramB);
startinfo.CreateNoWindow = false;
startinfo.UseShellExecute = false;
Process p = Process.Start(startinfo);
p.WaitForExit();
Console.ForegroundColor = color;
this way, both programs run seamlesly like they were one single program. 'nameProgramB' is the name to program 'B'. Hope this helps.