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

How to create installer for Wireshark using NSIS

0

I am creating an installer using NSIS. I want to detect whether user has installed correct version of Wireshark in his/her system or not. e.g. version 1.10.8. If this version is installed, then installer should proceed otherwise it should abort. I have created a basic code as shown below but don't know about how to detect the correct version. Following is my code:

page license
page directory
Page instfiles

section "VersionConfirmation" # read the value from the registry into the $0 register ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "DisplayName"

# print the results in a popup message box
MessageBox MB_OK "Current Version of Wireshark is : $0"

sectionEnd

I also want to copy one script file to location like “C:\Program Files\Wireshark\Plugins” as per Wireshark installed version. How can I accomplish this. Any help would be greatly appreciated. Thanks

asked 09 Aug ‘14, 04:10

Awesome's gravatar image

Awesome
1112
accept rate: 0%

edited 09 Aug ‘14, 04:10


One Answer:

0

Please check the original NSIS script for Wireshark.

source code --> packaging\nsis\wireshark.nsi

That file contains code to check the version of the installed package and also code to copy a certain file. You can use that as an example.

Furthermore, please read the NSIS docs.

http://nsis.sourceforge.net/Docs/

Regards
Kurt

answered 10 Aug '14, 07:06

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

edited 10 Aug '14, 07:07