Help with a traceroute

Here's how you can do it synchronously:
C#:
System.Diagnostics.Process process = new System.Diagnostics.Process();            
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = "tracert";
process.StartInfo.Arguments = "www.yahoo.com";
process.Start();

// read output synchronously
txtOutput.Text = process.StandardOutput.ReadToEnd();
The Process class also provides various asynchronous methods.
 
Back
Top