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

Wireshak capture drive.

0

Hello,

My drive c is full and when I am running the wireshark I get the error message low disk space. how can I change the drive where the packets are being captured. I do not mean when I save the capture but when the capture is being run I would like the packets to be stored in drive D.

BR, V. Nicolau

asked 01 Mar '11, 05:47

VictorNicolau's gravatar image

VictorNicolau
1111
accept rate: 0%


One Answer:

0

Wireshark (on windows) will use the environment variable %TEMP% to determine where to store the temporary files while capturing. If that fails it falls back to C:\

So make sure %TEMP% points to a directory on drive D.

answered 01 Mar '11, 06:15

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245
accept rate: 20%

Thanks for the answer unfortunately for me this solution will not work because the machine I am using wireshark on as to have the Temp directed to drive c otherwise the specific application does not work.

(01 Mar '11, 07:07) VictorNicolau
1

If you can't change the system temp directory you could set a temporary temp path for just one run of Wireshark. To do that, open a command prompt and type

set temp=d:\temp (press enter. )

Then, in the same command prompt, start Wireshark (usually by running c:\program files\wireshark\wireshark.exe, though it may be different on your machine). I have the Wireshark directory in my system path, so I could just call wireshark.exe.

You can automate this by writing a small batch file that sets the temp path before calling wireshark.exe, then create a shortcut and assign the Wireshark.exe icon to it.

(01 Mar '11, 08:59) Jasper ♦♦

(converted the "answers" to "comments" to adhere to the Q&A character of this site)

(01 Mar '11, 14:09) SYN-bit ♦♦

Thanks a lot. This is a good solution for me. Now I just need to know how to write a Batch file and associate the wireshark .exe icon to it.

BR, V. Nicolau

(02 Mar '11, 05:24) VictorNicolau

A batch file is just a text file that you can create with any text editor. In that file you write all commands, usually one per line, and save the complete file with a ".cmd" or ".bat" extension. That way you can execute it as a batch.

To assign an icon you might want to create a shortcut of the batch file and then use the shortcut properties to change the icon. Browse to the wireshark executable and select it as icon source.

(04 Mar '11, 12:38) Jasper ♦♦