1 réponse
Salut younest,
Fais des recherches au niveau de ProcessStartInfo:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = MonAppli.workingDirectory;
startInfo.FileName = "\"" + cmd + "\"";
startInfo.Arguments = " " + parametres;
startInfo.RedirectStandardOutput = true;
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
process = Process.Start(startInfo);
process.WaitForExit();
string stdout = process.StandardOutput.ReadToEnd();
process.Close();
En espérant que ça t'aide !
Fais des recherches au niveau de ProcessStartInfo:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = MonAppli.workingDirectory;
startInfo.FileName = "\"" + cmd + "\"";
startInfo.Arguments = " " + parametres;
startInfo.RedirectStandardOutput = true;
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
process = Process.Start(startInfo);
process.WaitForExit();
string stdout = process.StandardOutput.ReadToEnd();
process.Close();
En espérant que ça t'aide !
Et on n'appelle jamais des commandes comme cela : c'est crade et non professionnel.
On utilise les apis Network.