Answer the question
In order to leave comments, you need to log in
How to get normal console output?
cmdProcess = new Process();
var procStartInfo =
new ProcessStartInfo( "cmd", "/k " );
procStartInfo.RedirectStandardOutput = true;
procStartInfo.RedirectStandardInput = true;
procStartInfo.UseShellExecute = false;
procStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
procStartInfo.CreateNoWindow = true;
cmdProcess.OutputDataReceived += ( s, e ) => {
Console.WriteLine( e.Data + "\n" );
};
cmdProcess.StartInfo = procStartInfo;
cmdProcess.Start();
cmdProcess.BeginOutputReadLine();
cmdProcess.StandardInput.Write( msg );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question