ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + "myexe"); Process proc = new Process(); procStartInfo.WindowStyle = ProcessWindowStyle.Hidden; procStartInfo.UseShellExecute = false; procStartInfo.RedirectStandardOutput = true; //procStartInfo.CreateNoWindow = true; proc.StartInfo = procStartInfo; proc.Start(); string output = proc.StandardOutput.ReadToEnd(); proc.WaitForExit(300); richTextBox1.Text=output;
procStartInfo.UseShellExecute = true; procStartInfo.RedirectStandardOutput = false;
procStartInfo.UseShellExecute = true; procStartInfo.RedirectStandardOutput = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)