Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Batch File Execution error


17 Jun 2013   #1

Window 7 Ultimate 64bits
 
 
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 System SpecsSystem Spec
.

17 Jun 2013   #2

W7 Pro SP1 64bit
 
 

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 System SpecsSystem Spec
17 Jun 2013   #3

Window 7 Ultimate 64bits
 
 

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 System SpecsSystem Spec
.


18 Jun 2013   #4

Window 7 Ultimate 64bits
 
 

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 System SpecsSystem Spec
18 Jun 2013   #5

W7 Pro SP1 64bit
 
 

Can you find the output file when you run the batch file manually? (Using "run as admin".)
My System SpecsSystem Spec
19 Jun 2013   #6

Window 7 Ultimate 64bits
 
 

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 System SpecsSystem Spec
19 Jun 2013   #7

W7 Pro SP1 64bit
 
 

Thanks for posting back with your solution :-)
My System SpecsSystem Spec
Reply

 Batch File Execution error




Thread Tools



Similar help and support threads for2: Batch File Execution error
Thread Forum
Solved How to run a batch file at logoff & some batch scripting help please Backup and Restore
Solved Batch File that grabs file names from folder to insert into batch file General Discussion
SETX inside a Batch file Return Error:Access ..... Software
Mysterious File execution attempt on startup. Performance & Maintenance
Batch File Error Windows 7 x64 General Discussion
file association execution General Discussion

Our Sites

Site Links

About Us

Find 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 02:53 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33