接收命令行程序的输出信息
VB.NET
Private ReadOnly PMod As New Process()
PMod.StartInfo.FileName = "x.exe"
PMod.StartInfo.UseShellExecute = False
PMod.StartInfo.RedirectStandardOutput = True
PMod.StartInfo.CreateNoWindow = True
PMod.Start()
If PMod.WaitForExit(60000) Then
Dim message = PMod.StandardOutput.ReadToEnd().Split(New Char() {vbCrLf}, StringSplitOptions.RemoveEmptyEntries).ToList()
If message.Count > 0 Then
Debur.Print(String.Join("-", message))
End If
End If