Dim P = New Process
With P.StartInfo
.FileName = "cmd.exe"
.Arguments = "/c " & strCMD
.UseShellExecute = False
.RedirectStandardInput = True
.RedirectStandardOutput = True
.RedirectStandardError = True
.CreateNoWindow = True
End With
P.Start()
End If
Do
result = P.StandardOutput.ReadLine
Loop While Not P.HasExited
Do
result = P.StandardOutput.ReadLine
TextBox1.Text &= result & vbCrLf
Application.DoEvents()
Loop While Not P.HasExited