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

Is it possible to add Wireshark to the Windows path during installation?

0

I'd like to use Wireshark command line tools, such as tshark on Windows. In the command prompt, tshark can be only invoked if the Wireshark install directory is known or if it is added to the Windows path variables.

Is there a way that when Wireshark is installed with the standard Windows installer, the install directory is automatically added to the Path variable, so that the command line tools can be used from the command prompt? i.e not manually added by the user, but automatically by the installer

asked 22 Dec '11, 17:14

tonio09's gravatar image

tonio09
6234
accept rate: 0%

edited 22 Dec '11, 17:49

multipleinterfaces's gravatar image

multipleinte...
1.3k152340


One Answer:

1

You could do this yourself by modifying packaging/nsis/wireshark.nsi to include sections similar to those found on the NSIS Wiki article on Path Manipulation. However, you should keep in mind the warning mentioned on the same page. You could probably get around this using the Large Strings build, but even this could fail for exceptionally long PATHs.

Ultimately, I don't think Wireshark will include this feature out of the box until and if the string length limitation of NSIS is fixed (and then someone has to update the installer script). By far, the easiest way to do this for now will be to do so manually after installation. If you do end up making such modifications to Wireshark, and they work with the regular version of NSIS without messing up the PATH, I would highly recommend submitting a patch to be included in Wireshark itself.

answered 22 Dec '11, 17:48

multipleinterfaces's gravatar image

multipleinte...
1.3k152340
accept rate: 12%