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

I want to change wireshark ".pcapng" temp files' directory, how to config or where to modify the source code?

asked 20 Jan '14, 17:09

metamatrix's gravatar image

metamatrix
56161619
accept rate: 100%


Presumably you mean the directory in which it writes temporary capture files.

On UN*X, you can set the TMPDIR environment variable to the directory you want the temporary files (which may be difficult if you're launching it from the GUI rather than the command line); on Windows, you can set the TEMP environment variable.

permanent link

answered 20 Jan '14, 17:39

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

I need only wireshark temp files to write in user config directory, without modifying the system temp directory. How to do?

(20 Jan '14, 21:09) metamatrix

Modify the source code by changing the create_tempfile() routine to use a different directory.

(20 Jan '14, 23:42) Guy Harris ♦♦

Just create a batch file that sets "temp" to whatever you need and runs Wireshark afterwards. That will get you a temporary "temp" path that will be discarded as soon as Wireshark exits. Much easier than a code change :)

(21 Jan '14, 01:15) Jasper ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×26
×10
×10

question asked: 20 Jan '14, 17:09

question was seen: 10,116 times

last updated: 21 Jan '14, 01:15

p​o​w​e​r​e​d by O​S​Q​A