© 2026 Hedgehog Software, LLC
var path = "C:\\program.exe"; Process process = new Process(); process.StartInfo.FileName = path; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => { if (!String.IsNullOrEmpty(e.Data)) { output.Append(e.Data + "\r\n"); } }); process.Start(); process.BeginOutputReadLine(); process.WaitForExit(); tboxConsole.AppendText(output.ToString()); process.WaitForExit(); process.Close();