I am trying to Start a process of Wireshark, and export a .pcap file to Plain text.
From the command line, I am able to do the export, so I know that the arguments are correct and the program is in the PATH environment.
Interestingly enough, I use this piece of code one time this morning, and it worked correctly. Subsequent runs it failed to convert the file.
Here is the code I am using.
private void Button1Click(object sender, EventArgs e)
{
var stinfo = new ProcessStartInfo();
stinfo.FileName = @"c:\Program Files (x86)\Wireshark\tshark.exe";
stinfo.Arguments = "-V -r " + @"c:\Brian_00001_20151110133639.pcap" + " > " + @"c:\\Brian_00001_20151110133639.txt";
stinfo.CreateNoWindow = true;
stinfo.UseShellExecute = false;
stinfo.RedirectStandardOutput = true;
stinfo.RedirectStandardError = true;
Process myProcess = Process.Start(stinfo);
myProcess.Start();
myProcess.WaitForExit();
}
Thanks,