ich eine Eingabeaufforderung Befehl bin Ausführung wie folgt:C# ausführen Kommando-Shell und führen bekommen
string cmd = "/c dir" ;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.Arguments = cmd;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start();
Wie ich die Ausgabe des Befehls zu erhalten?
diese Antwort von Sehen Sie, wie 'ReadToEnd'method zu verwenden: http://stackoverflow.com/a/7160384/214222 –