No prob. Glad to help.
I added an enhancement for opening the textfile (optional) when its done processing.
vb Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oPSI As New System.Diagnostics.ProcessStartInfo Dim oProcess As System.Diagnostics.Process With oPSI .FileName = "C:\Windows\System32\cmd.exe" .CreateNoWindow = True .WindowStyle = ProcessWindowStyle.Hidden .WorkingDirectory = "C:\Users\VB-Guru\" .UseShellExecute = True .Arguments = "/C Ping google.com > PingResults.txt" End With oProcess = System.Diagnostics.Process.Start(oPSI) oProcess.WaitForExit() System.Diagnostics.Process.Start(oPSI.WorkingDirectory & "PingResults.txt") End Sub






Reply With Quote