SEWS-E
asked on
Wireshark vbscript does not run when using capture filter parameters
Hi,
I'm writing a vbscript to automate wireshark captures using dumpcap.exe, but i've hit a bit of a stumbling block when I try to use a capture filter in the code.
The bit of code below runs and works ok.
When I add a capture filter '-f net 10.44.4.0/23' into the objShell.Exec command parameters, the vbscript runs and then promptly closes without running wireshark.
If I run
I'm guessing there's a syntax error in the command and it needs some quotes wrapping around something, but I can't figure out where or what!
If anyone could point me in the right direction that would be great.
Thanks,
Paul
I'm writing a vbscript to automate wireshark captures using dumpcap.exe, but i've hit a bit of a stumbling block when I try to use a capture filter in the code.
The bit of code below runs and works ok.
Const ForAppending = 8
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("C:\Program Files\Wireshark\dumpcap.exe -a duration:15 -w C:\wireshark.pcap")
When I add a capture filter '-f net 10.44.4.0/23' into the objShell.Exec command parameters, the vbscript runs and then promptly closes without running wireshark.
Const ForAppending = 8
Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("C:\Program Files\Wireshark\dumpcap.exe -f net 10.44.4.0/23 -a duration:15 -w C:\wireshark.pcap")
If I run
I'm guessing there's a syntax error in the command and it needs some quotes wrapping around something, but I can't figure out where or what!
If anyone could point me in the right direction that would be great.
Thanks,
Paul
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dumpcap.exe -f "net 10.44.4.0/23" -a duration:15 -w C:\test.pcap
Thanks,
Paul