This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Run DumpCap without displaying anything to user.

0

I'm running Dumpcap on a machine at user login, but I would like for it to be hidden. Right now I'm able to get it running and logging like I need it to, however it pops up a window that the user can see (Capturing on 'Interface Name' | File: x:\path\name.pcapng), and if they close that window the capture stops. I would like to hide the window so that they cannot close it.

asked 30 Mar '16, 08:22

ZekeTheSquirrel's gravatar image

ZekeTheSquirrel
11113
accept rate: 0%


One Answer:

0

Have a look over at http://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window

Basically, create 2 files:

1) hidecmd.vbs whose contents are, e.g.:

'HideBat.vbs
CreateObject("Wscript.Shell").Run "your_batch_file.bat", 0, True

(The top answer also works but this one was shorter/simpler. I did not test every solution provided.)

2) The your_batch_file.bat with the dumpcap.exe command and options that you need.

answered 30 Mar '16, 10:43

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

Thank you! I'd seen this before but I could not get it to work. I realized my problem was that the bat file was using start "...\dumpcap.exe", which still opened a new window.

(30 Mar '16, 11:11) ZekeTheSquirrel