[Process] - Récupérer la sortie
Bonjour,
Je cherche à récupérer la sortie d'un processus voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
ProcessStartInfo process = new ProcessStartInfo();
process.RedirectStandardOutput = true;
process.CreateNoWindow = true;
process.UseShellExecute = false;
process.FileName = @"flv.exe";
process.Arguments = args;
p = Process.Start(process);
string s = p.StandardOutput.ReadToEnd();
//p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
//p.BeginOutputReadLine();
p.WaitForExit(); |
mais ma string s me renvoie une chaîne vide !! Alors que si j'exécute mon programme en mode console il affiche pleeeiin de ligne !! Quelqu'un peut il m'aider ? merci d'avance !