Ejecutar shell y capturar la salida
Dim p As New Process p.StartInfo.UseShellExecute = False p.StartInfo.RedirectStandardOutput = True p.StartInfo.Arguments = "x.txt y.txt" p.StartInfo.WorkingDirectory = "E:\winnt\system32" p.StartInfo.FileName = "xcopy " p.Start() Dim sr As IO.StreamReader = p.StandardOutput Dim sb As New System.Text.StringBuilder("") Dim sinput As String = "" Do Until sinput = "-1" sb.Append(sr.ReadLine() & ControlChars.CrLf) sinput = sr.Read Loop Return sb.ToString