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
growing

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
UsernameIssues

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
growing

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
growing

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
UsernameIssues

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
growing

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
UsernameIssues

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
Thread Forum
Getting input data after execution of batch file.
My batch file code is like this: @echo off C:\Windows\System32\netsh.exe wlan set hostednetwor mode=allow ssid=User_Name key=password eyUsage=persistent In this code the "User_name" and "password" fields I want the input from the user after running the batch file. How do I make it...
General Discussion
Batch File execution problem
I have created a batch program as listed below. It is supposed to read all MP3 files from given folderMP3_CDs_12GB recursively and write to three folders B0 (first 999 files), B1 (next 999 files) and B2 (balance of about 2,800 files). It should also write three text files with the File serial...
General Discussion
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
Batch File Error Windows 7 x64
Hey Guys, Tried writing a batch file to open a few programs I use together regularly, but which I don't want all the time on startup. I've tried: start “Maxivista” /d “C:\Program Files\MaxiVista Pro Server\MaxiVistaAll.exe" start “Netbeans” /d "R:\Program Files\NetBeans...
General Discussion
file association execution
hi, i am new to microsoft operating system. always likes unix more :) anyway, i was trying to use the registry to locate the branch which holds the executable for a specific file type so i could add parameters to it. suppose, when i double click *.docx file, i would like winword to load the...
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 07:13.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App