Batch File Execution error


  1. Posts : 5
    Window 7 Ultimate 64bits
       #1

    Batch File Execution error


    Please I need help!
    I have been on this stuff for over hours now..and no headway out.

    I want to write a batch script that can run tshark as shown below
    .................................................................................................... ............................................................
    @echo off

    Start "" "C:\Mytraces\Program Files\Wireshark\tshark -i 1 -a duration:60 -t r -t ad -b filesize:100000 -b files:10 -w usingbatchsetup.pcap
    .................................................................................................... .............................................................

    But I got errors and the final one being...

    .................................................................................................... ................................................................
    windows cannot find "C:\Mytraces\Program Files\Wireshark\tshark -i 1 -a duration:60 -t r -t ad -b filesize:100000 -b files:10 -w usingbatchsetup.pcap" make sure you type the name correctly, then try again.
    .................................................................................................... ................................................................
    Please what can I do....?
      My Computer


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #2

    Welcome to the Seven Forums.

    Remove this part:

    Start "" "C:\Mytrace.....

    so the line should start with:
    "C:\Mytrace

    Move the closing quotation mark to the end of the file to be run:
    "C:\Mytraces\Program Files\Wireshark\tshark"

    You should not need a closing quotation mark after all of those parameters and switches.
      My Computer


  3. Posts : 5
    Window 7 Ultimate 64bits
    Thread Starter
       #3

    Thank you, it worked.

    "C:\Mytraces\Program Files\Wireshark\tshark" -i 1 -a duration:60 -t r -t ad -b filesize:100000 -b files:10 -w usingbatchsetup.pcap

    Thanks pretty much....
      My Computer


  4. Posts : 5
    Window 7 Ultimate 64bits
    Thread Starter
       #4

    I want to autorun this file in windows task schedule, but encountered error....
    and when I attempted to "run with highest privilege", I can't find the output file.

    Please what can I do, where can I find the file?
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    Can you find the output file when you run the batch file manually? (Using "run as admin".)
      My Computer


  6. Posts : 5
    Window 7 Ultimate 64bits
    Thread Starter
       #6

    I could not find the file(s) manually, but I had a workaround that gave me access to the file... using the following command

    C:\Fighting\Program Files\Wireshark\tshark" -i 1 -a duration:108 -t r -t ad -b filesize:10 -b files:100 -w C:\Fighting\%computername%__%dt%_%tm%.pcap

    I was able to provide an output path.

    Thanks
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    Thanks for posting back with your solution
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:43.
Find Us