引用:
Dim myProcess As New Process() Dim myProcessStartInfo As New ProcessStartInfo("cmd.exe") myProcessStartInfo.UseShellExecute = False myProcessStartInfo.RedirectStandardOutput = true myProcess.StartInfo = myProcessStartInfo myProcessStartInfo.Arguments="/c " & Cmd.text myProcess.Start() Dim myStreamReader As StreamReader = myProcess.StandardOutput Dim myString As String = myStreamReader.Readtoend() myProcess.Close() result.text=Cmd.text & vbcrlf & "