Process proc = new Process();
proc.StartInfo.FileName = @"C:\Users\Administrator\Desktop\Python27\ToolArtworkEmoji.bat";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
proc.OutputDataReceived += proc_OutputDataReceived;
proc.BeginOutputReadLine();
proc.WaitForExit();
textbox1.Text = proc.StandardOutput.ReadToEnd();
Why code not active. It not show command in textbox. Can I help me? Thank you very much
You need to read the output in your
proc_OutputDataReceived
handler, and not viaproc.StandardOutput.ReadToEnd();
In other words, put something like
in the
proc_OutputDataReceived
handler (e is a DataReceivedEventArgs argument)