1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
ProcessStartInfo processStartInfo = new ProcessStartInfo();
Process newProcess = new Process();
processStartInfo.FileName = "nipper";
processStartInfo.Arguments = "nipper --ios-router --input=Routeur_Cisco.txt --output=C:\\Users\\champion\\Desktop\\rapport.html";
String output = string.Empty;
try
{
// Lancement du processus
newProcess = Process.Start(processStartInfo);
output = newProcess.StandardOutput.ReadLine();
string myUrl = "file:///" + Directory.GetCurrentDirectory().Replace("\\", "/") + output;
MessageBox.Show(myUrl);
webBrowser1.Navigate(myUrl);
newProcess.WaitForExit(10000);
newProcess.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "!!!!");
} |
Partager