Thomas....I again tried the system() with double escape and quotes
combination but still I'm getting the same error.
but there is a curious observation...if I put the actual command line string
into a batch file and call the batch file using system, it really works
then... :-)
here is the example-
system("d:\\input\\mybatchfile.bat")

contents of mybatchfile.bat ---
"C:\Program Files\Wireshark\tshark.exe" -r D:\input\tcpdump.cap -R
"tcp.dstport==7275 && ulp.msSUPLPOS" -V > D:\output\dump.txt


On Thu, Apr 30, 2009 at 7:05 AM, Thomas Hruska <[email protected]>wrote:

>
>
> Sri wrote:
> > Thomas ....thanks again for your input.
> > I will try for createprocess again, however I used the system() call in
> the
> > same way as you told it and infact also checked the command line string
> > using sprintf to ensure that the execuatble path is in quotes and
> everything
> > is proper but stiil I'm getting the same error.
> >
> > Regards,
> >
> > Sri
>
> >> system("cmd /C \"C:\\Program Files\\Wireshark\\tshark.exe\" -r
> >> C:\\input\\tcpdump.cap -R \"tcp.dstport==7275 && ulp.msSUPLPOS\" -V >
> >> C:\\output\\dump.txt");
>
> Make sure the command works from the command-line before sticking it
> into a C/C++ program. Maybe double escaping and quoting the whole thing
> like this:
>
> system("cmd /C \"\\\"C:\\Program Files\\Wireshark\\tshark.exe\\\" -r
> C:\\input\\tcpdump.cap -R \\\"tcp.dstport==7275 && ulp.msSUPLPOS\\\"
> -V\" > C:\\output\\dump.txt");
>
> Will solve the problem. Basically boils down to:
>
> cmd /C "\"C:\Program Files\Wireshark\tshark.exe\" -r
> C:\input\tcpdump.cap -R \"tcp.dstport==7275 && ulp.msSUPLPOS\" -V" >
> C:\output\dump.txt
>
> --
> Thomas Hruska
> CubicleSoft President
> Ph: 517-803-4197
>
> *NEW* MyTaskFocus 1.1
> Get on task. Stay on task.
>
> http://www.CubicleSoft.com/MyTaskFocus/
>
>  
>



-- 
Regards
Sri


[Non-text portions of this message have been removed]

Reply via email to