Dim p As New Process()
p.StartInfo.FileName = "cmd.exe"
p.StartInfo.UseShellExecute = False '关闭Shell的使用
p.StartInfo.RedirectStandardInput = True '重定向标准输入
p.StartInfo.RedirectStandardOutput = True '重定向标准输出
p.StartInfo.RedirectStandardError = True '重定向错误输出
p.StartInfo.CreateNoWindow = True '设置不显示窗口
p.Start()
Dim bb As String = "echo f| xcopy """ & fi & """ """ & fi1 & """ /i /D /s /e /c /y /h"
p.StandardInput.WriteLine(bb)
p.StandardInput.WriteLine("exit")
请问如何判断CMD已经执行完毕和判断结果?