I am attempting to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).
RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).
But inside SSIS: Attempt with C# Script: failed, CSV file created but is empty. Attempt with Execute Process: failed, CSV file created but is empty.
The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with packets.
DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.
Process cmd = new Process();
cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";
cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";
cmd.Start();
Dts.TaskResult = (int)ScriptResults.Success;