Help with a traceroute

Eccentric

New member
Joined
Apr 10, 2006
Messages
1
Hi, does anyone know a way of running a traceroute inside a form then displaying the results in a label?
 
Heres 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