sto eseguendo un comando prompt dei comandi come segue:C# eseguire comandi shell e ottenere il risultato
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();
Come ottengo l'output del comando?
Vai a questa risposta di come usare 'ReadToEnd'method: http://stackoverflow.com/a/7160384/214222 –