using shell command to run ping and save the results

nmrhth

New member
Joined
Sep 2, 2003
Messages
1
I want to run the ping program using the shell command and save the results to a text file. is there any way to have visual basic save the result of the ping operation?
 
something similar to

Code:
Dim pi As New ProcessStartInfo
		pi.FileName = "ping.exe"
		pi.RedirectStandardOutput = True

		Dim p As New Process
		p.StartInfo = pi
		p.Start()
		Dim s As String = p.StandardOutput.ReadToEnd

should do it
 
Back
Top