5 ; Set the compression mechanism first.
6 ; As of NSIS 2.07, solid compression which makes installer about 1MB smaller
7 ; is no longer the default, so use the /SOLID switch.
8 ; This unfortunately is unknown to NSIS prior to 2.07 and creates an error.
9 ; So if you get an error here, please update to at least NSIS 2.07!
10 SetCompressor
/SOLID lzma
11 SetCompressorDictSize
64 ; MB
13 !include "wireshark-common.nsh"
14 !include 'LogicLib.nsh'
15 !include "StrFunc.nsh"
16 !include "WordFunc.nsh"
21 ; See https://nsis.sourceforge.io/Check_if_a_file_exists_at_compile_time for documentation
22 !macro !defineifexist _VAR_NAME _FILE_NAME
24 !ifdef NSIS_WIN32_MAKENSIS
26 !system 'if exist "${_FILE_NAME}" echo !define ${_VAR_NAME} > "${_TEMPFILE}"'
29 !system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi'
31 !include '${_TEMPFILE}'
32 !delfile '${_TEMPFILE}'
35 !define !defineifexist "!insertmacro !defineifexist"
37 ; ============================================================================
38 ; Header configuration
39 ; ============================================================================
42 OutFile "${OUTFILE_DIR}\${PROGRAM_NAME}-${VERSION}-${WIRESHARK_TARGET_PLATFORM}.exe"
44 Icon "${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico"
46 UninstallIcon "${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico"
48 ; ============================================================================
50 ; ============================================================================
51 ; The modern user interface will look much better than the common one.
52 ; However, as the development of the modern UI is still going on, and the script
53 ; syntax changes, you will need exactly that NSIS version, which this script is
54 ; made for. This is the current (December 2003) latest version: V2.0b4
55 ; If you are using a different version, it's not predictable what will happen.
58 !include "InstallOptions.nsh"
59 ;!addplugindir ".\Plugins"
61 !define MUI_ICON
"${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico"
62 !define MUI_UNICON
"${TOP_SRC_DIR}\resources\icons\wiresharkinst.ico"
63 BrandingText "Wireshark${U+00ae} Installer"
65 !define MUI_COMPONENTSPAGE_SMALLDESC
66 !define MUI_FINISHPAGE_NOAUTOCLOSE
67 !define MUI_WELCOMEPAGE_TITLE_3LINES
68 !define MUI_WELCOMEPAGE_TEXT
"This wizard will guide you through the installation of ${PROGRAM_NAME}.$\r$\n$\r$\nBefore starting the installation, make sure ${PROGRAM_NAME} is not running.$\r$\n$\r$\nClick 'Next' to continue."
69 ;!define MUI_FINISHPAGE_LINK "Install Npcap to be able to capture packets from a network."
70 ;!define MUI_FINISHPAGE_LINK_LOCATION "https://npcap.com/"
72 ; NSIS shows Readme files by opening the Readme file with the default application for
73 ; the file's extension. "README.win32" won't work in most cases, because extension "win32"
74 ; is usually not associated with an appropriate text editor. We should use extension "txt"
75 ; for a text file or "html" for an html README file.
76 !define MUI_FINISHPAGE_TITLE_3LINES
77 !define MUI_FINISHPAGE_SHOWREADME
"$INSTDIR\release-notes.html"
78 !define MUI_FINISHPAGE_SHOWREADME_TEXT
"Open the release notes"
79 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
80 ; NSIS runs as Administrator and will run Wireshark as Administrator
81 ; if these are enabled.
82 ;!define MUI_FINISHPAGE_RUN "$INSTDIR\${PROGRAM_NAME_PATH}"
83 ;!define MUI_FINISHPAGE_RUN_NOTCHECKED
85 !define MUI_PAGE_CUSTOMFUNCTION_SHOW myShowCallback
87 ; ============================================================================
89 ; ============================================================================
91 !insertmacro MUI_PAGE_WELCOME
93 !define MUI_LICENSEPAGE_TEXT_TOP
"Wireshark is distributed under the GNU General Public License."
94 !define MUI_LICENSEPAGE_TEXT_BOTTOM
"This is not an end user license agreement (EULA). It is provided here for informational purposes only."
95 !define MUI_LICENSEPAGE_BUTTON
"Noted"
96 !insertmacro MUI_PAGE_LICENSE
"${STAGING_DIR}\COPYING.txt"
98 Page custom DisplayDonatePage
100 !insertmacro MUI_PAGE_COMPONENTS
102 Page custom DisplayAdditionalTasksPage LeaveAdditionalTasksPage
104 !insertmacro MUI_PAGE_DIRECTORY
105 Page custom DisplayNpcapPage
106 Page custom DisplayUSBPcapPage
107 !insertmacro MUI_PAGE_INSTFILES
108 !insertmacro MUI_PAGE_FINISH
110 ; Uninstall stuff (NSIS 2.08: "\r\n" don't work here)
111 !define MUI_UNCONFIRMPAGE_TEXT_TOP
"The following ${PROGRAM_NAME} installation will be removed. Click 'Next' to continue."
112 ; Uninstall stuff (this text isn't used with the MODERN_UI!)
113 ;UninstallText "This will uninstall ${PROGRAM_NAME}.\r\nBefore starting the uninstallation, make sure ${PROGRAM_NAME} is not running.\r\nClick 'Next' to continue."
115 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
116 !define MUI_WELCOMEPAGE_TITLE_3LINES
117 !define MUI_FINISHPAGE_TITLE_3LINES
119 !insertmacro MUI_UNPAGE_WELCOME
120 !insertmacro MUI_UNPAGE_CONFIRM
121 !insertmacro MUI_UNPAGE_COMPONENTS
122 !insertmacro MUI_UNPAGE_INSTFILES
123 !insertmacro MUI_UNPAGE_FINISH
125 ; ============================================================================
127 ; ============================================================================
129 !insertmacro MUI_LANGUAGE
"English"
131 ; ============================================================================
133 ; ============================================================================
135 ;Things that need to be extracted on first (keep these lines before any File command!)
136 ;Only useful for BZIP2 compression
138 ; Old Modern 1 UI: https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html
139 ; To do: Upgrade to the Modern 2 UI:
140 ;ReserveFile "AdditionalTasksPage.ini"
141 ReserveFile
"DonatePage.ini"
142 ReserveFile
"NpcapPage.ini"
143 ReserveFile
"USBPcapPage.ini"
144 ReserveFile
/plugin InstallOptions
.dll
146 ; Modern UI 2 / nsDialog pages.
147 ; https://nsis.sourceforge.io/Docs/Modern%20UI%202/Readme.html
148 ; https://nsis.sourceforge.io/Docs/nsDialogs/Readme.html
150 !include "wireshark-additional-tasks.nsdinc"
153 ; ============================================================================
155 ; ============================================================================
156 !include "Sections.nsh"
158 ; ============================================================================
160 ; ============================================================================
161 !include "FileFunc.nsh"
163 !insertmacro GetParameters
164 !insertmacro GetOptions
166 ; ========= Install extcap binary and help file =========
167 !macro InstallExtcap EXTCAP_NAME
170 File "${STAGING_DIR}\${EXTCAP_NAME}.html"
171 SetOutPath $INSTDIR\extcap
172 File "${STAGING_DIR}\extcap\wireshark\${EXTCAP_NAME}.exe"
176 ; ========= Check if silent mode install of /EXTRACOMPONENTS =========
177 !macro CheckExtrasFlag EXTRAS_NAME
178 !define EXTRAS_FLAG
${__LINE__}
180 IfSilent
+1 skip_
${EXTRAS_FLAG}
185 ${GetOptions} $R0 "/EXTRACOMPONENTS=" $R1
186 IfErrors popreg_
${EXTRAS_FLAG}
187 ${WordFind} $R1 "," "E+1" $R0
189 ; No delimiters found - check for single word match
191 StrCmp $R1 ${EXTRAS_NAME} install_
${EXTRAS_FLAG} popreg_
${EXTRAS_FLAG}
194 ; Loop through all delimited words checking for match
197 StrCmp $R0 ${EXTRAS_NAME} install_
${EXTRAS_FLAG} 0
199 ${WordFind} $R1 "," "E+$R2" $R0
201 Goto popreg_
${EXTRAS_FLAG}
203 install_
${EXTRAS_FLAG}:
204 !insertmacro InstallExtcap
${EXTRAS_NAME}
205 popreg_
${EXTRAS_FLAG}:
214 ; ============================================================================
215 ; Component page configuration
216 ; ============================================================================
217 ComponentText "The following components are available for installation."
219 ; ============================================================================
220 ; Directory selection page configuration
221 ; ============================================================================
222 ; The text to prompt the user to enter a directory
223 DirText "Choose a directory in which to install ${PROGRAM_NAME}."
225 ; The default installation directory
226 InstallDir $PROGRAMFILES64\
${PROGRAM_NAME}
228 ; See if this is an upgrade; if so, use the old InstallDir as default
229 InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\
${PROGRAM_NAME} InstallDir
232 ; ============================================================================
233 ; Install page configuration
234 ; ============================================================================
237 ; ============================================================================
238 ; Functions and macros
239 ; ============================================================================
242 ; https://docs.microsoft.com/en-us/windows/win32/shell/fa-file-types
245 !insertmacro PushFileExtensions
249 ${DoUntil} $EXTENSION ==
${FILE_EXTENSION_MARKER}
250 ReadRegStr $R0 HKCR $EXTENSION ""
251 StrCmp $R0 "" Associate
.doRegister
254 Associate
.doRegister:
255 ;The extension is not associated to any program, we can do the link
256 WriteRegStr HKCR $EXTENSION "" ${WIRESHARK_ASSOC}
257 DetailPrint "Registered file type: $EXTENSION"
268 Var DESKTOP_ICON_STATE
269 Var FILE_ASSOCIATE_STATE
281 Var WIX_DISPLAYVERSION
282 Var WIX_UNINSTALLSTRING
284 ; ============================================================================
285 ; Platform and OS version checks
286 ; ============================================================================
290 !include WinMessages
.nsh
293 ; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873
294 ${IfNot} ${RunningX64}
295 MessageBox MB_OK "Wireshark only runs on 64 bit machines.$\nTry installing a 32 bit version (3.6 or earlier) instead." /SD
IDOK
299 !if ${WIRESHARK_TARGET_PLATFORM} ==
"x64"
300 ${If} ${IsNativeARM64}
301 MessageBox MB_OK "You're installing the x64 version of Wireshark on an Arm64 system.$\nThe native Arm64 installer might work better." /SD
IDOK
305 !if ${WIRESHARK_TARGET_PLATFORM} ==
"arm64"
306 ${IfNot} ${IsNativeARM64}
307 MessageBox MB_OK "You're trying to install the Arm64 version of Wireshark on an x64 system.$\nTry the native x64 installer instead." /SD
IDOK
312 ; This should match the following:
313 ; - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
314 ; - The <compatibility><application> section in image\wireshark.exe.manifest.in
315 ; - The VersionNT parts of packaging\wix\Prerequisites.wxi
318 ; MessageBox MB_OK "You're running Windows $R0."
322 "Windows 95, 98, and ME are no longer supported.$\nPlease install Ethereal 0.99.0 instead." \
329 "Windows NT 4.0 is no longer supported.$\nPlease install Wireshark 0.99.4 instead." \
336 "Windows 2000 is no longer supported.$\nPlease install Wireshark 1.2 or 1.0 instead." \
344 "Windows XP and Server 2003 are no longer supported.$\nPlease install ${PROGRAM_NAME} 1.12 or 1.10 instead." \
352 "Windows Vista and Server 2008 are no longer supported.$\nPlease install ${PROGRAM_NAME} 2.2 instead." \
357 ${If} ${AtMostWin8
.1
}
358 ${OrIf} ${AtMostWin2012R2}
360 "Windows 7, 8, 8.1, Server 2008R2, and Server 2012 are no longer supported.$\nPlease install ${PROGRAM_NAME} 4.0 instead." \
365 !insertmacro IsWiresharkRunning
367 ; Default control values.
368 StrCpy $START_MENU_STATE ${BST_CHECKED}
369 StrCpy $DESKTOP_ICON_STATE ${BST_UNCHECKED}
370 StrCpy $FILE_ASSOCIATE_STATE ${BST_CHECKED}
372 ; Copied from https://nsis.sourceforge.io/Auto-uninstall_old_before_installing_new
373 ReadRegStr $OLD_UNINSTALLER HKLM \
374 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
376 StrCmp $OLD_UNINSTALLER "" check_wix
378 ReadRegStr $OLD_INSTDIR HKLM \
379 "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe" \
381 StrCmp $OLD_INSTDIR "" check_wix
383 ReadRegStr $OLD_DISPLAYNAME HKLM \
384 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" \
386 StrCmp $OLD_DISPLAYNAME "" done
388 ; We're reinstalling. Flip our control states according to what the
390 ; (we use the "all users" start menu, so select it first)
391 SetShellVarContext all
392 ; MessageBox MB_OK|MB_ICONINFORMATION "oninit 1 sm $START_MENU_STATE di $DESKTOP_ICON_STATE"
393 ${IfNot} ${FileExists} $SMPROGRAMS\
${PROGRAM_NAME}.lnk
394 StrCpy $START_MENU_STATE ${BST_UNCHECKED}
396 ${If} ${FileExists} $DESKTOP\
${PROGRAM_NAME}.lnk
397 StrCpy $DESKTOP_ICON_STATE ${BST_CHECKED}
399 ; Leave FILE_ASSOCIATE_STATE checked.
400 ; MessageBox MB_OK|MB_ICONINFORMATION "oninit 2 sm $START_MENU_STATE $SMPROGRAMS\${PROGRAM_NAME}\${PROGRAM_NAME}.lnk \
401 ; $\ndi $DESKTOP_ICON_STATE $DESKTOP\${PROGRAM_NAME}.lnk
403 MessageBox MB_YESNOCANCEL|
MB_ICONQUESTION \
404 "$OLD_DISPLAYNAME is already installed.\
405 $\n$\nWould you like to uninstall it first?" \
407 IDYES prep_nsis_uninstaller \
411 ; Copy the uninstaller to $TEMP and run it.
412 ; The uninstaller normally does this by itself, but doesn't wait around
413 ; for the executable to finish, which means ExecWait won't work correctly.
414 prep_nsis_uninstaller:
416 StrCpy $TMP_UNINSTALLER "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
417 ; ...because we surround UninstallString in quotes.
418 StrCpy $0 $OLD_UNINSTALLER -1 1
419 StrCpy $1 "$TEMP\${PROGRAM_NAME}_uninstaller.exe"
421 System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1'
422 ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR"
424 Delete "$TMP_UNINSTALLER"
426 ; Look for a WiX-installed package.
429 StrCpy $REGISTRY_BITS 64
434 EnumRegKey $TMP_PRODUCT_GUID HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" $0
435 StrCmp $TMP_PRODUCT_GUID "" wix_enum_reg_done
437 ReadRegStr $WIX_DISPLAYNAME HKLM \
438 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \
440 ; MessageBox MB_OK|MB_ICONINFORMATION "Reading HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1 DisplayName = $2"
441 ; Look for "Wireshark".
442 StrCmp $WIX_DISPLAYNAME "${PROGRAM_NAME}" wix_found wix_reg_enum_loop
445 ReadRegStr $WIX_DISPLAYVERSION HKLM \
446 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \
448 ReadRegStr $WIX_UNINSTALLSTRING HKLM \
449 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TMP_PRODUCT_GUID" \
451 StrCmp $WIX_UNINSTALLSTRING "" done
452 MessageBox MB_YESNOCANCEL|
MB_ICONQUESTION \
453 "$WIX_DISPLAYNAME $WIX_DISPLAYVERSION (msi) is already installed.\
454 $\n$\nWould you like to uninstall it first?" \
456 IDYES prep_wix_uninstaller \
460 ; Run the WiX-provided UninstallString.
461 prep_wix_uninstaller:
463 ExecWait "$WIX_UNINSTALLSTRING"
468 ; MessageBox MB_OK|MB_ICONINFORMATION "Checked $0 $REGISTRY_BITS bit keys"
469 IntCmp $REGISTRY_BITS 32 done
470 StrCpy $REGISTRY_BITS 32
472 Goto check_wix_restart
476 ; Command line parameters
479 ${GetOptions} $R0 "/desktopicon=" $R1
481 StrCpy $DESKTOP_ICON_STATE ${BST_CHECKED}
482 ${ElseIf} $R1 ==
"no"
483 StrCpy $DESKTOP_ICON_STATE ${BST_UNCHECKED}
486 ;Extract InstallOptions INI files
487 ;!insertmacro INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
488 !insertmacro INSTALLOPTIONS_EXTRACT
"DonatePage.ini"
489 !insertmacro INSTALLOPTIONS_EXTRACT
"NpcapPage.ini"
490 !insertmacro INSTALLOPTIONS_EXTRACT
"USBPcapPage.ini"
494 Function DisplayAdditionalTasksPage
495 Call fnc_AdditionalTasksPage_Show
499 Function DisplayDonatePage
500 !insertmacro MUI_HEADER_TEXT
"Your donations keep these releases coming" "Donate today"
501 !insertmacro INSTALLOPTIONS_DISPLAY
"DonatePage.ini"
504 Function DisplayNpcapPage
505 !insertmacro MUI_HEADER_TEXT
"Packet Capture" "Wireshark requires Npcap to capture live network data."
506 !insertmacro INSTALLOPTIONS_DISPLAY
"NpcapPage.ini"
509 Function DisplayUSBPcapPage
510 !insertmacro MUI_HEADER_TEXT
"USB Capture" "USBPcap is required to capture USB traffic. Should USBPcap be installed (experimental)?"
511 !insertmacro INSTALLOPTIONS_DISPLAY
"USBPcapPage.ini"
514 ; ============================================================================
515 ; Installation execution commands
516 ; ============================================================================
518 Var USBPCAP_UNINSTALL
;declare variable for holding the value of a registry key
519 ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
522 ;-------------------------------------------
525 ; Install for every user
527 SetShellVarContext all
530 !ifndef SKIP_UNINSTALLER
531 WriteUninstaller "$INSTDIR\${UNINSTALLER_NAME}"
533 File "${STAGING_DIR}\libwiretap.dll"
534 File "${STAGING_DIR}\libwireshark.dll"
535 File "${STAGING_DIR}\libwsutil.dll"
537 !include wireshark
-manifest
.nsh
539 File "${STAGING_DIR}\COPYING.txt"
540 File "${STAGING_DIR}\README.txt"
541 File "${STAGING_DIR}\wka"
542 File "${STAGING_DIR}\pdml2html.xsl"
543 File "${STAGING_DIR}\ws.css"
544 File "${STAGING_DIR}\wireshark.html"
545 File "${STAGING_DIR}\wireshark-filter.html"
546 File "${STAGING_DIR}\dumpcap.exe"
547 File "${STAGING_DIR}\dumpcap.html"
548 File "${STAGING_DIR}\extcap.html"
549 File "${STAGING_DIR}\ipmap.html"
550 File "${STAGING_DIR}\release-notes.html"
553 ; C-runtime redistributable
554 ; vc_redist.x64.exe or vc_redist.x86.exe - copy and execute the redistributable installer
555 File "${VCREDIST_DIR}\${VCREDIST_EXE}"
556 ; If the user already has the redistributable installed they will see a
557 ; Big Ugly Dialog by default, asking if they want to uninstall or repair.
558 ; Ideally we should add a checkbox for this somewhere. In the meantime,
559 ; just do a "quiet" install.
561 ; http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html
562 ExecWait '"$INSTDIR\${VCREDIST_EXE}" /install /quiet /norestart' $0
563 DetailPrint "${VCREDIST_EXE} returned $0"
565 ; https://docs.microsoft.com/en-us/windows/desktop/Msi/error-codes
566 !define ERROR_SUCCESS
0
567 !define ERROR_SUCCESS_REBOOT_INITIATED
1641
568 !define ERROR_PRODUCT_VERSION
1638
569 !define ERROR_SUCCESS_REBOOT_REQUIRED
3010
571 ${Case} ${ERROR_SUCCESS}
572 ${Case} ${ERROR_PRODUCT_VERSION}
574 ${Case} ${ERROR_SUCCESS_REBOOT_INITIATED} ; Shouldn't happen.
575 ${Case} ${ERROR_SUCCESS_REBOOT_REQUIRED}
579 MessageBox MB_OK "The Visual C++ Redistributable installer failed with error $0.$\nUnable to continue installation." /SD
IDOK
584 Delete "$INSTDIR\${VCREDIST_EXE}"
588 ; global config files - don't overwrite if already existing
589 ;IfFileExists cfilters dont_overwrite_cfilters
590 File "${STAGING_DIR}\cfilters"
591 ;dont_overwrite_cfilters:
592 ;IfFileExists colorfilters dont_overwrite_colorfilters
593 File "${STAGING_DIR}\colorfilters"
594 ;dont_overwrite_colorfilters:
595 ;IfFileExists dfilters dont_overwrite_dfilters
596 File "${STAGING_DIR}\dfilters"
597 ;dont_overwrite_dfilters:
598 ;IfFileExists smi_modules dont_overwrite_smi_modules
599 File "${STAGING_DIR}\smi_modules"
600 ;dont_overwrite_smi_modules:
604 ; Install the Diameter DTD and XML files in the "diameter" subdirectory
605 ; of the installation directory.
607 SetOutPath $INSTDIR\diameter
608 File "${STAGING_DIR}\diameter\AlcatelLucent.xml"
609 File "${STAGING_DIR}\diameter\chargecontrol.xml"
610 File "${STAGING_DIR}\diameter\Cisco.xml"
611 File "${STAGING_DIR}\diameter\CiscoSystems.xml"
612 File "${STAGING_DIR}\diameter\Custom.xml"
613 File "${STAGING_DIR}\diameter\dictionary.dtd"
614 File "${STAGING_DIR}\diameter\dictionary.xml"
615 File "${STAGING_DIR}\diameter\eap.xml"
616 File "${STAGING_DIR}\diameter\Ericsson.xml"
617 File "${STAGING_DIR}\diameter\etsie2e4.xml"
618 File "${STAGING_DIR}\diameter\HP.xml"
619 File "${STAGING_DIR}\diameter\Huawei.xml"
620 File "${STAGING_DIR}\diameter\Inovar.xml"
621 File "${STAGING_DIR}\diameter\Juniper.xml"
622 File "${STAGING_DIR}\diameter\Metaswitch.xml"
623 File "${STAGING_DIR}\diameter\Microsoft.xml"
624 File "${STAGING_DIR}\diameter\mobileipv4.xml"
625 File "${STAGING_DIR}\diameter\mobileipv6.xml"
626 File "${STAGING_DIR}\diameter\nasreq.xml"
627 File "${STAGING_DIR}\diameter\Nokia.xml"
628 File "${STAGING_DIR}\diameter\NokiaSolutionsAndNetworks.xml"
629 File "${STAGING_DIR}\diameter\Oracle.xml"
630 File "${STAGING_DIR}\diameter\Siemens.xml"
631 File "${STAGING_DIR}\diameter\sip.xml"
632 File "${STAGING_DIR}\diameter\Starent.xml"
633 File "${STAGING_DIR}\diameter\sunping.xml"
634 File "${STAGING_DIR}\diameter\Telefonica.xml"
635 File "${STAGING_DIR}\diameter\TGPP.xml"
636 File "${STAGING_DIR}\diameter\TGPP2.xml"
637 File "${STAGING_DIR}\diameter\Travelping.xml"
638 File "${STAGING_DIR}\diameter\Vodafone.xml"
639 File "${STAGING_DIR}\diameter\VerizonWireless.xml"
640 !include "custom_diameter_xmls.txt"
644 ; Install the RADIUS directory files in the "radius" subdirectory
645 ; of the installation directory.
647 SetOutPath $INSTDIR\radius
648 File "${STAGING_DIR}\radius\README.radius_dictionary"
649 File "${STAGING_DIR}\radius\custom.includes"
650 File "${STAGING_DIR}\radius\dictionary"
651 File "${STAGING_DIR}\radius\dictionary.3com"
652 File "${STAGING_DIR}\radius\dictionary.3gpp"
653 File "${STAGING_DIR}\radius\dictionary.3gpp2"
654 File "${STAGING_DIR}\radius\dictionary.5x9"
655 File "${STAGING_DIR}\radius\dictionary.acc"
656 File "${STAGING_DIR}\radius\dictionary.acme"
657 File "${STAGING_DIR}\radius\dictionary.actelis"
658 File "${STAGING_DIR}\radius\dictionary.adtran"
659 File "${STAGING_DIR}\radius\dictionary.adva"
660 File "${STAGING_DIR}\radius\dictionary.aerohive"
661 File "${STAGING_DIR}\radius\dictionary.airespace"
662 File "${STAGING_DIR}\radius\dictionary.alcatel"
663 File "${STAGING_DIR}\radius\dictionary.alcatel-lucent.aaa"
664 File "${STAGING_DIR}\radius\dictionary.alcatel.esam"
665 File "${STAGING_DIR}\radius\dictionary.alcatel.sr"
666 File "${STAGING_DIR}\radius\dictionary.alphion"
667 File "${STAGING_DIR}\radius\dictionary.alteon"
668 File "${STAGING_DIR}\radius\dictionary.altiga"
669 File "${STAGING_DIR}\radius\dictionary.alvarion"
670 File "${STAGING_DIR}\radius\dictionary.alvarion.wimax.v2_2"
671 File "${STAGING_DIR}\radius\dictionary.apc"
672 File "${STAGING_DIR}\radius\dictionary.aptilo"
673 File "${STAGING_DIR}\radius\dictionary.aptis"
674 File "${STAGING_DIR}\radius\dictionary.arbor"
675 File "${STAGING_DIR}\radius\dictionary.arista"
676 File "${STAGING_DIR}\radius\dictionary.aruba"
677 File "${STAGING_DIR}\radius\dictionary.ascend"
678 File "${STAGING_DIR}\radius\dictionary.ascend.illegal"
679 File "${STAGING_DIR}\radius\dictionary.ascend.illegal.extended"
680 File "${STAGING_DIR}\radius\dictionary.asn"
681 File "${STAGING_DIR}\radius\dictionary.audiocodes"
682 File "${STAGING_DIR}\radius\dictionary.avaya"
683 File "${STAGING_DIR}\radius\dictionary.azaire"
684 File "${STAGING_DIR}\radius\dictionary.bay"
685 File "${STAGING_DIR}\radius\dictionary.bintec"
686 File "${STAGING_DIR}\radius\dictionary.bigswitch"
687 File "${STAGING_DIR}\radius\dictionary.bintec"
688 File "${STAGING_DIR}\radius\dictionary.bluecoat"
689 File "${STAGING_DIR}\radius\dictionary.boingo"
690 File "${STAGING_DIR}\radius\dictionary.bristol"
691 File "${STAGING_DIR}\radius\dictionary.broadsoft"
692 File "${STAGING_DIR}\radius\dictionary.brocade"
693 File "${STAGING_DIR}\radius\dictionary.bskyb"
694 File "${STAGING_DIR}\radius\dictionary.bt"
695 File "${STAGING_DIR}\radius\dictionary.cablelabs"
696 File "${STAGING_DIR}\radius\dictionary.cabletron"
697 File "${STAGING_DIR}\radius\dictionary.calix"
698 File "${STAGING_DIR}\radius\dictionary.cambium"
699 File "${STAGING_DIR}\radius\dictionary.camiant"
700 File "${STAGING_DIR}\radius\dictionary.centec"
701 File "${STAGING_DIR}\radius\dictionary.checkpoint"
702 File "${STAGING_DIR}\radius\dictionary.chillispot"
703 File "${STAGING_DIR}\radius\dictionary.ciena"
704 File "${STAGING_DIR}\radius\dictionary.cisco"
705 File "${STAGING_DIR}\radius\dictionary.cisco.asa"
706 File "${STAGING_DIR}\radius\dictionary.cisco.bbsm"
707 File "${STAGING_DIR}\radius\dictionary.cisco.vpn3000"
708 File "${STAGING_DIR}\radius\dictionary.cisco.vpn5000"
709 File "${STAGING_DIR}\radius\dictionary.citrix"
710 File "${STAGING_DIR}\radius\dictionary.ckey"
711 File "${STAGING_DIR}\radius\dictionary.clavister"
712 File "${STAGING_DIR}\radius\dictionary.cnergee"
713 File "${STAGING_DIR}\radius\dictionary.colubris"
714 File "${STAGING_DIR}\radius\dictionary.columbia_university"
715 File "${STAGING_DIR}\radius\dictionary.compat"
716 File "${STAGING_DIR}\radius\dictionary.compatible"
717 File "${STAGING_DIR}\radius\dictionary.cosine"
718 File "${STAGING_DIR}\radius\dictionary.covaro"
719 File "${STAGING_DIR}\radius\dictionary.dante"
720 File "${STAGING_DIR}\radius\dictionary.dellemc"
721 File "${STAGING_DIR}\radius\dictionary.digium"
722 File "${STAGING_DIR}\radius\dictionary.dlink"
723 File "${STAGING_DIR}\radius\dictionary.dragonwave"
724 File "${STAGING_DIR}\radius\dictionary.efficientip"
725 File "${STAGING_DIR}\radius\dictionary.eleven"
726 File "${STAGING_DIR}\radius\dictionary.eltex"
727 File "${STAGING_DIR}\radius\dictionary.enterasys"
728 File "${STAGING_DIR}\radius\dictionary.epygi"
729 File "${STAGING_DIR}\radius\dictionary.equallogic"
730 File "${STAGING_DIR}\radius\dictionary.ericsson"
731 File "${STAGING_DIR}\radius\dictionary.ericsson.ab"
732 File "${STAGING_DIR}\radius\dictionary.ericsson.packet.core.networks"
733 File "${STAGING_DIR}\radius\dictionary.erx"
734 File "${STAGING_DIR}\radius\dictionary.extreme"
735 File "${STAGING_DIR}\radius\dictionary.f5"
736 File "${STAGING_DIR}\radius\dictionary.fdxtended"
737 File "${STAGING_DIR}\radius\dictionary.force10"
738 File "${STAGING_DIR}\radius\dictionary.fortinet"
739 File "${STAGING_DIR}\radius\dictionary.foundry"
740 File "${STAGING_DIR}\radius\dictionary.freedhcp"
741 File "${STAGING_DIR}\radius\dictionary.freeradius"
742 File "${STAGING_DIR}\radius\dictionary.freeradius.evs5"
743 File "${STAGING_DIR}\radius\dictionary.freeradius.internal"
744 File "${STAGING_DIR}\radius\dictionary.freeswitch"
745 File "${STAGING_DIR}\radius\dictionary.gandalf"
746 File "${STAGING_DIR}\radius\dictionary.garderos"
747 File "${STAGING_DIR}\radius\dictionary.gemtek"
748 File "${STAGING_DIR}\radius\dictionary.h3c"
749 File "${STAGING_DIR}\radius\dictionary.hillstone"
750 File "${STAGING_DIR}\radius\dictionary.hp"
751 File "${STAGING_DIR}\radius\dictionary.huawei"
752 File "${STAGING_DIR}\radius\dictionary.iana"
753 File "${STAGING_DIR}\radius\dictionary.identity_engines"
754 File "${STAGING_DIR}\radius\dictionary.iea"
755 File "${STAGING_DIR}\radius\dictionary.infinera"
756 File "${STAGING_DIR}\radius\dictionary.infoblox"
757 File "${STAGING_DIR}\radius\dictionary.infonet"
758 File "${STAGING_DIR}\radius\dictionary.ingate"
759 File "${STAGING_DIR}\radius\dictionary.ipunplugged"
760 File "${STAGING_DIR}\radius\dictionary.issanni"
761 File "${STAGING_DIR}\radius\dictionary.itk"
762 File "${STAGING_DIR}\radius\dictionary.jradius"
763 File "${STAGING_DIR}\radius\dictionary.juniper"
764 File "${STAGING_DIR}\radius\dictionary.karlnet"
765 File "${STAGING_DIR}\radius\dictionary.kineto"
766 File "${STAGING_DIR}\radius\dictionary.lancom"
767 File "${STAGING_DIR}\radius\dictionary.lantronix"
768 File "${STAGING_DIR}\radius\dictionary.livingston"
769 File "${STAGING_DIR}\radius\dictionary.localweb"
770 File "${STAGING_DIR}\radius\dictionary.lucent"
771 File "${STAGING_DIR}\radius\dictionary.manzara"
772 File "${STAGING_DIR}\radius\dictionary.meinberg"
773 File "${STAGING_DIR}\radius\dictionary.mellanox"
774 File "${STAGING_DIR}\radius\dictionary.meraki"
775 File "${STAGING_DIR}\radius\dictionary.merit"
776 File "${STAGING_DIR}\radius\dictionary.meru"
777 File "${STAGING_DIR}\radius\dictionary.microsemi"
778 File "${STAGING_DIR}\radius\dictionary.microsoft"
779 File "${STAGING_DIR}\radius\dictionary.mikrotik"
780 File "${STAGING_DIR}\radius\dictionary.mimosa"
781 File "${STAGING_DIR}\radius\dictionary.motorola"
782 File "${STAGING_DIR}\radius\dictionary.motorola.illegal"
783 File "${STAGING_DIR}\radius\dictionary.motorola.wimax"
784 File "${STAGING_DIR}\radius\dictionary.navini"
785 File "${STAGING_DIR}\radius\dictionary.net"
786 File "${STAGING_DIR}\radius\dictionary.netelastic"
787 File "${STAGING_DIR}\radius\dictionary.netscreen"
788 File "${STAGING_DIR}\radius\dictionary.networkphysics"
789 File "${STAGING_DIR}\radius\dictionary.nexans"
790 File "${STAGING_DIR}\radius\dictionary.nile"
791 File "${STAGING_DIR}\radius\dictionary.nokia"
792 File "${STAGING_DIR}\radius\dictionary.nokia.conflict"
793 File "${STAGING_DIR}\radius\dictionary.nomadix"
794 File "${STAGING_DIR}\radius\dictionary.nortel"
795 File "${STAGING_DIR}\radius\dictionary.ntua"
796 File "${STAGING_DIR}\radius\dictionary.openser"
797 File "${STAGING_DIR}\radius\dictionary.openwifi"
798 File "${STAGING_DIR}\radius\dictionary.packeteer"
799 File "${STAGING_DIR}\radius\dictionary.paloalto"
800 File "${STAGING_DIR}\radius\dictionary.patton"
801 File "${STAGING_DIR}\radius\dictionary.perle"
802 File "${STAGING_DIR}\radius\dictionary.pfsense"
803 File "${STAGING_DIR}\radius\dictionary.pica8"
804 File "${STAGING_DIR}\radius\dictionary.propel"
805 File "${STAGING_DIR}\radius\dictionary.prosoft"
806 File "${STAGING_DIR}\radius\dictionary.proxim"
807 File "${STAGING_DIR}\radius\dictionary.purewave"
808 File "${STAGING_DIR}\radius\dictionary.quiconnect"
809 File "${STAGING_DIR}\radius\dictionary.quintum"
810 File "${STAGING_DIR}\radius\dictionary.rcntec"
811 File "${STAGING_DIR}\radius\dictionary.redcreek"
812 File "${STAGING_DIR}\radius\dictionary.rfc2865"
813 File "${STAGING_DIR}\radius\dictionary.rfc2866"
814 File "${STAGING_DIR}\radius\dictionary.rfc2867"
815 File "${STAGING_DIR}\radius\dictionary.rfc2868"
816 File "${STAGING_DIR}\radius\dictionary.rfc2869"
817 File "${STAGING_DIR}\radius\dictionary.rfc3162"
818 File "${STAGING_DIR}\radius\dictionary.rfc3576"
819 File "${STAGING_DIR}\radius\dictionary.rfc3580"
820 File "${STAGING_DIR}\radius\dictionary.rfc4072"
821 File "${STAGING_DIR}\radius\dictionary.rfc4372"
822 File "${STAGING_DIR}\radius\dictionary.rfc4603"
823 File "${STAGING_DIR}\radius\dictionary.rfc4675"
824 File "${STAGING_DIR}\radius\dictionary.rfc4679"
825 File "${STAGING_DIR}\radius\dictionary.rfc4818"
826 File "${STAGING_DIR}\radius\dictionary.rfc4849"
827 File "${STAGING_DIR}\radius\dictionary.rfc5090"
828 File "${STAGING_DIR}\radius\dictionary.rfc5176"
829 File "${STAGING_DIR}\radius\dictionary.rfc5447"
830 File "${STAGING_DIR}\radius\dictionary.rfc5580"
831 File "${STAGING_DIR}\radius\dictionary.rfc5607"
832 File "${STAGING_DIR}\radius\dictionary.rfc5904"
833 File "${STAGING_DIR}\radius\dictionary.rfc6519"
834 File "${STAGING_DIR}\radius\dictionary.rfc6572"
835 File "${STAGING_DIR}\radius\dictionary.rfc6677"
836 File "${STAGING_DIR}\radius\dictionary.rfc6911"
837 File "${STAGING_DIR}\radius\dictionary.rfc6929"
838 File "${STAGING_DIR}\radius\dictionary.rfc6930"
839 File "${STAGING_DIR}\radius\dictionary.rfc7055"
840 File "${STAGING_DIR}\radius\dictionary.rfc7155"
841 File "${STAGING_DIR}\radius\dictionary.rfc7268"
842 File "${STAGING_DIR}\radius\dictionary.rfc7499"
843 File "${STAGING_DIR}\radius\dictionary.rfc7930"
844 File "${STAGING_DIR}\radius\dictionary.rfc8045"
845 File "${STAGING_DIR}\radius\dictionary.rfc8559"
846 File "${STAGING_DIR}\radius\dictionary.riverbed"
847 File "${STAGING_DIR}\radius\dictionary.riverstone"
848 File "${STAGING_DIR}\radius\dictionary.roaringpenguin"
849 File "${STAGING_DIR}\radius\dictionary.ruckus"
850 File "${STAGING_DIR}\radius\dictionary.ruggedcom"
851 File "${STAGING_DIR}\radius\dictionary.sangoma"
852 File "${STAGING_DIR}\radius\dictionary.sg"
853 File "${STAGING_DIR}\radius\dictionary.shasta"
854 File "${STAGING_DIR}\radius\dictionary.shiva"
855 File "${STAGING_DIR}\radius\dictionary.siemens"
856 File "${STAGING_DIR}\radius\dictionary.slipstream"
857 File "${STAGING_DIR}\radius\dictionary.smartsharesystems"
858 File "${STAGING_DIR}\radius\dictionary.sofaware"
859 File "${STAGING_DIR}\radius\dictionary.softbank"
860 File "${STAGING_DIR}\radius\dictionary.sonicwall"
861 File "${STAGING_DIR}\radius\dictionary.springtide"
862 File "${STAGING_DIR}\radius\dictionary.starent"
863 File "${STAGING_DIR}\radius\dictionary.starent.vsa1"
864 File "${STAGING_DIR}\radius\dictionary.surfnet"
865 File "${STAGING_DIR}\radius\dictionary.symbol"
866 File "${STAGING_DIR}\radius\dictionary.t_systems_nova"
867 File "${STAGING_DIR}\radius\dictionary.telebit"
868 File "${STAGING_DIR}\radius\dictionary.telkom"
869 File "${STAGING_DIR}\radius\dictionary.telrad"
870 File "${STAGING_DIR}\radius\dictionary.terena"
871 File "${STAGING_DIR}\radius\dictionary.tplink"
872 File "${STAGING_DIR}\radius\dictionary.trapeze"
873 File "${STAGING_DIR}\radius\dictionary.travelping"
874 File "${STAGING_DIR}\radius\dictionary.tripplite"
875 File "${STAGING_DIR}\radius\dictionary.tropos"
876 File "${STAGING_DIR}\radius\dictionary.ukerna"
877 File "${STAGING_DIR}\radius\dictionary.unisphere"
878 File "${STAGING_DIR}\radius\dictionary.unix"
879 File "${STAGING_DIR}\radius\dictionary.usr"
880 File "${STAGING_DIR}\radius\dictionary.usr.illegal"
881 File "${STAGING_DIR}\radius\dictionary.utstarcom"
882 File "${STAGING_DIR}\radius\dictionary.valemount"
883 File "${STAGING_DIR}\radius\dictionary.vasexperts"
884 File "${STAGING_DIR}\radius\dictionary.verizon"
885 File "${STAGING_DIR}\radius\dictionary.versanet"
886 File "${STAGING_DIR}\radius\dictionary.walabi"
887 File "${STAGING_DIR}\radius\dictionary.waverider"
888 File "${STAGING_DIR}\radius\dictionary.wichorus"
889 File "${STAGING_DIR}\radius\dictionary.wifialliance"
890 File "${STAGING_DIR}\radius\dictionary.wimax"
891 File "${STAGING_DIR}\radius\dictionary.wimax.alvarion"
892 File "${STAGING_DIR}\radius\dictionary.wimax.wichorus"
893 File "${STAGING_DIR}\radius\dictionary.wispr"
894 File "${STAGING_DIR}\radius\dictionary.xedia"
895 File "${STAGING_DIR}\radius\dictionary.xylan"
896 File "${STAGING_DIR}\radius\dictionary.yubico"
897 File "${STAGING_DIR}\radius\dictionary.zeus"
898 File "${STAGING_DIR}\radius\dictionary.zte"
899 File "${STAGING_DIR}\radius\dictionary.zyxel"
900 !include "custom_radius_dict.txt"
904 ; install the dtds in the dtds subdirectory
906 SetOutPath $INSTDIR\dtds
907 File "${STAGING_DIR}\dtds\dc.dtd"
908 File "${STAGING_DIR}\dtds\itunes.dtd"
909 File "${STAGING_DIR}\dtds\mscml.dtd"
910 File "${STAGING_DIR}\dtds\pocsettings.dtd"
911 File "${STAGING_DIR}\dtds\presence.dtd"
912 File "${STAGING_DIR}\dtds\reginfo.dtd"
913 File "${STAGING_DIR}\dtds\rlmi.dtd"
914 File "${STAGING_DIR}\dtds\rss.dtd"
915 File "${STAGING_DIR}\dtds\smil.dtd"
916 File "${STAGING_DIR}\dtds\xcap-caps.dtd"
917 File "${STAGING_DIR}\dtds\xcap-error.dtd"
918 File "${STAGING_DIR}\dtds\watcherinfo.dtd"
921 ; Create the extcap directory
922 CreateDirectory $INSTDIR\extcap
925 ; install the protobuf .proto definitions in the protobuf subdirectory
927 SetOutPath $INSTDIR\protobuf
928 File "${STAGING_DIR}\protobuf\*.proto"
930 ; Install the TPNCP DAT file in the "tpncp" subdirectory
931 ; of the installation directory.
932 SetOutPath $INSTDIR\tpncp
933 File "${STAGING_DIR}\tpncp\tpncp.dat"
936 ; install the wimaxasncp TLV definitions in the wimaxasncp subdirectory
938 SetOutPath $INSTDIR\wimaxasncp
939 File "${STAGING_DIR}\wimaxasncp\dictionary.xml"
940 File "${STAGING_DIR}\wimaxasncp\dictionary.dtd"
943 ; Write the installation path into the registry for InstallDirRegKey
944 WriteRegStr HKEY_LOCAL_MACHINE SOFTWARE\
${PROGRAM_NAME} InstallDir "$INSTDIR"
946 ; Write the uninstall keys for Windows
947 ; https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
948 ; https://docs.microsoft.com/en-us/previous-versions/ms954376(v=msdn.10)
949 ; https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key
950 !define UNINSTALL_PATH
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
952 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Comments" "${DISPLAY_NAME}"
954 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${PROGRAM_NAME_PATH},0"
956 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayName" "${DISPLAY_NAME}"
957 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
958 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "HelpLink" "https://ask.wireshark.org/"
959 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "InstallLocation" "$INSTDIR"
960 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "Publisher" "The Wireshark developer community, https://www.wireshark.org"
961 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLInfoAbout" "https://www.wireshark.org"
962 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "URLUpdateInfo" "https://www.wireshark.org/download.html"
964 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoModify" 1
965 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "NoRepair" 1
966 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMajor" ${MAJOR_VERSION}
967 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "VersionMinor" ${MINOR_VERSION}
969 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\${UNINSTALLER_NAME}"'
970 WriteRegStr HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\${UNINSTALLER_NAME}" /S'
972 ; To quote https://web.archive.org/web/20150911221413/http://download.microsoft.com/download/0/4/6/046bbd36-0812-4c22-a870-41911c6487a6/WindowsUserExperience.pdf:
973 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
974 Delete "$SMPROGRAMS\${PROGRAM_NAME}\Wireshark Web Site.lnk"
976 ; Create file extensions if the Associated Tasks page check box
978 ${If} $FILE_ASSOCIATE_STATE ==
${BST_CHECKED}
979 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
980 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME_PATH}" "%1"'
981 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME_PATH}",1'
982 ; We refresh the icon cache down in -Finally.
984 ; If you add something here be sure to sync it with the uninstall section and the
985 ; AdditionalTasks page
988 ; if running as a silent installer, don't try to install npcap
989 IfSilent SecRequired_skip_Npcap
991 ; Install Npcap (depending on npcap page setting)
992 ReadINIStr $0 "$PLUGINSDIR\NpcapPage.ini" "Field 4" "State"
993 StrCmp $0 "0" SecRequired_skip_Npcap
995 File "${EXTRA_INSTALLER_DIR}\npcap-${NPCAP_PACKAGE_VERSION}.exe"
996 ExecWait '"$INSTDIR\npcap-${NPCAP_PACKAGE_VERSION}.exe" /winpcap_mode=no /loopback_support=no' $0
997 DetailPrint "Npcap installer returned $0"
998 SecRequired_skip_Npcap:
1000 ; If running as a silent installer, don't try to install USBPcap
1001 IfSilent SecRequired_skip_USBPcap
1003 ReadINIStr $0 "$PLUGINSDIR\USBPcapPage.ini" "Field 4" "State"
1004 StrCmp $0 "0" SecRequired_skip_USBPcap
1006 File "${EXTRA_INSTALLER_DIR}\USBPcapSetup-${USBPCAP_PACKAGE_VERSION}.exe"
1007 ExecWait '"$INSTDIR\USBPcapSetup-${USBPCAP_PACKAGE_VERSION}.exe"' $0
1008 DetailPrint "USBPcap installer returned $0"
1011 ${DisableX64FSRedirection}
1014 ReadRegStr $USBPCAP_UNINSTALL HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\USBPcap" "UninstallString"
1016 ${EnableX64FSRedirection}
1019 ${StrRep} $0 '$USBPCAP_UNINSTALL' 'Uninstall.exe' 'USBPcapCMD.exe'
1020 ${StrRep} $1 '$0' '"' ''
1021 CopyFiles /SILENT
$1 $INSTDIR\extcap
1024 SecRequired_skip_USBPcap:
1026 ; If no user profile exists for Wireshark but for Ethereal, copy it over
1027 SetShellVarContext current
1028 IfFileExists $APPDATA\Wireshark profile_done
1029 IfFileExists $APPDATA\Ethereal
0 profile_done
1030 ;MessageBox MB_YESNO "This seems to be the first time you use Wireshark. Copy over the personal settings from Ethereal?" /SD IDYES IDNO profile_done
1031 CreateDirectory $APPDATA\Wireshark
1032 CopyFiles $APPDATA\Ethereal\
*.* $APPDATA\Wireshark
1034 SetShellVarContext all
1036 SectionEnd ; "Required"
1039 Section "${PROGRAM_NAME}" SecWiresharkQt
1040 ;-------------------------------------------
1041 ; by default, Wireshark.exe is installed
1043 File "${QT_DIR}\${PROGRAM_NAME_PATH}"
1044 File /r
"${QT_DIR}\translations"
1045 ; Write an entry for ShellExecute
1046 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "" '$INSTDIR\${PROGRAM_NAME_PATH}'
1047 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "Path" '$INSTDIR'
1049 !ifndef SKIP_NSIS_QT_DLLS
1050 !include wireshark
-qt
-manifest
.nsh
1053 ; Is the Start Menu check box checked?
1054 ${If} $START_MENU_STATE ==
${BST_CHECKED}
1055 CreateShortCut "$SMPROGRAMS\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH}" "" "$INSTDIR\${PROGRAM_NAME_PATH}" 0 "" "" "${PROGRAM_FULL_NAME}"
1058 ${If} $DESKTOP_ICON_STATE ==
${BST_CHECKED}
1059 CreateShortCut "$DESKTOP\${PROGRAM_NAME}.lnk" "$INSTDIR\${PROGRAM_NAME_PATH}" "" "$INSTDIR\${PROGRAM_NAME_PATH}" 0 "" "" "${PROGRAM_FULL_NAME}"
1062 SectionEnd ; "SecWiresharkQt"
1066 Section "TShark" SecTShark
1067 ;-------------------------------------------
1069 File "${STAGING_DIR}\tshark.exe"
1070 File "${STAGING_DIR}\tshark.html"
1073 Section "-Plugins & Extensions"
1075 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs'
1076 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g711.dll"
1077 !ifdef SPANDSP_FOUND
1078 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g722.dll"
1079 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g726.dll"
1082 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\g729.dll"
1084 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\l16mono.dll"
1086 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\sbc.dll"
1089 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\ilbc.dll"
1092 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\opus_dec.dll"
1095 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\codecs\amrnb.dll"
1098 ; This should be a function or macro
1099 SetOutPath '$INSTDIR\profiles\Bluetooth'
1100 File "${STAGING_DIR}\profiles\Bluetooth\colorfilters"
1101 File "${STAGING_DIR}\profiles\Bluetooth\preferences"
1102 SetOutPath '$INSTDIR\profiles\Classic'
1103 File "${STAGING_DIR}\profiles\Classic\colorfilters"
1104 SetOutPath '$INSTDIR\profiles\No Reassembly'
1105 File "${STAGING_DIR}\profiles\No Reassembly\preferences"
1107 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
1108 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\ethercat.dll"
1109 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\gryphon.dll"
1110 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\ipaddr.dll"
1111 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\irda.dll"
1112 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\opcua.dll"
1113 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\profinet.dll"
1114 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\unistim.dll"
1115 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimax.dll"
1116 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxasncp.dll"
1117 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\wimaxmacphy.dll"
1118 !include "custom_plugins.txt"
1120 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap'
1121 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\wiretap\usbdump.dll"
1123 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
1124 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\mate.dll"
1127 SetOutPath '$INSTDIR\snmp\mibs'
1128 File "${SMI_DIR}\share\mibs\iana\*"
1129 File "${SMI_DIR}\share\mibs\ietf\*"
1130 File "${SMI_DIR}\share\mibs\irtf\*"
1131 File "${SMI_DIR}\share\mibs\tubs\*"
1132 File "${SMI_DIR}\share\pibs\*"
1133 File "${SMI_DIR}\share\yang\*.yang"
1134 !include "custom_mibs.txt"
1137 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
1138 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\transum.dll"
1140 SetOutPath '$INSTDIR\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan'
1141 File "${STAGING_DIR}\plugins\${MAJOR_VERSION}.${MINOR_VERSION}\epan\stats_tree.dll"
1143 SectionEnd ; "Plugins / Extensions"
1145 Section "-Additional command line tools"
1148 File "${STAGING_DIR}\capinfos.exe"
1149 File "${STAGING_DIR}\capinfos.html"
1151 File "${STAGING_DIR}\captype.exe"
1152 File "${STAGING_DIR}\captype.html"
1154 File "${STAGING_DIR}\editcap.exe"
1155 File "${STAGING_DIR}\editcap.html"
1157 File "${STAGING_DIR}\mergecap.exe"
1158 File "${STAGING_DIR}\mergecap.html"
1160 !ifdef MMDBRESOLVE_EXE
1161 File "${STAGING_DIR}\mmdbresolve.html"
1162 File "${STAGING_DIR}\mmdbresolve.exe"
1165 File "${STAGING_DIR}\randpkt.exe"
1166 File "${STAGING_DIR}\randpkt.html"
1168 File "${STAGING_DIR}\rawshark.exe"
1169 File "${STAGING_DIR}\rawshark.html"
1171 File "${STAGING_DIR}\reordercap.exe"
1172 File "${STAGING_DIR}\reordercap.html"
1174 File "${STAGING_DIR}\sharkd.exe"
1175 ;File "${STAGING_DIR}\sharkd.html"
1177 File "${STAGING_DIR}\text2pcap.exe"
1178 File "${STAGING_DIR}\text2pcap.html"
1180 SectionEnd ; "Tools"
1182 SectionGroup
/e
"External capture tools (extcap)" SecExtcapGroup
1184 Section /o
"Androiddump" SecAndroiddump
1185 ;-------------------------------------------
1186 !insertmacro InstallExtcap
"androiddump"
1188 !insertmacro CheckExtrasFlag
"androiddump"
1190 !ifdef BUILD_etwdump
1191 Section "Etwdump" SecEtwdump
1192 ;-------------------------------------------
1193 !insertmacro InstallExtcap
"Etwdump"
1195 !insertmacro CheckExtrasFlag
"Etwdump"
1198 Section /o
"Randpktdump" SecRandpktdump
1199 ;-------------------------------------------
1200 !insertmacro InstallExtcap
"randpktdump"
1202 !insertmacro CheckExtrasFlag
"randpktdump"
1205 Section /o
"Sshdump, Ciscodump, and Wifidump" SecSshdump
1206 ;-------------------------------------------
1207 !insertmacro InstallExtcap
"sshdump"
1208 !insertmacro InstallExtcap
"ciscodump"
1209 !insertmacro InstallExtcap
"wifidump"
1211 !insertmacro CheckExtrasFlag
"sshdump"
1212 !insertmacro CheckExtrasFlag
"ciscodump"
1213 !insertmacro CheckExtrasFlag
"wifidump"
1216 Section /o
"UDPdump" SecUDPdump
1217 ;-------------------------------------------
1218 !insertmacro InstallExtcap
"udpdump"
1220 !insertmacro CheckExtrasFlag
"udpdump"
1222 SectionGroupEnd
; "External Capture (extcap)"
1224 Section "-Clear Partial Selected"
1225 !insertmacro ClearSectionFlag
${SecExtcapGroup} ${SF_PSELECTED}
1229 Section "-Documentation"
1231 SetOutPath "$INSTDIR\Wireshark User's Guide"
1232 File /r
"${DOC_DIR}\wsug_html_chunked\*.*"
1235 File "${DOC_DIR}\faq.html"
1241 !insertmacro UpdateIcons
1243 ; Compute and write the installation directory size
1244 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
1245 IntFmt $0 "0x%08X" $0
1246 WriteRegDWORD HKEY_LOCAL_MACHINE "${UNINSTALL_PATH}" "EstimatedSize" "$0"
1250 ; ============================================================================
1252 ; ============================================================================
1253 !include "Sections.nsh"
1255 ; ============================================================================
1256 ; Uninstall page configuration
1257 ; ============================================================================
1258 ShowUninstDetails show
1260 ; ============================================================================
1261 ; Functions and macros
1262 ; ============================================================================
1264 Function un
.Disassociate
1266 !insertmacro PushFileExtensions
1269 ${DoUntil} $EXTENSION ==
${FILE_EXTENSION_MARKER}
1270 ReadRegStr $R0 HKCR $EXTENSION ""
1271 StrCmp $R0 ${WIRESHARK_ASSOC} un
.Disassociate
.doDeregister
1272 Goto un
.Disassociate
.end
1273 un
.Disassociate
.doDeregister:
1274 ; The extension is associated with Wireshark so, we must destroy this!
1275 DeleteRegKey HKCR $EXTENSION
1276 DetailPrint "Deregistered file type: $EXTENSION"
1277 un
.Disassociate
.end:
1287 !define EXECUTABLE_MARKER
"EXECUTABLE_MARKER"
1290 Section /o
"Un.USBPcap" un
.SecUSBPcap
1291 ;-------------------------------------------
1294 ${DisableX64FSRedirection}
1297 ReadRegStr $1 HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\USBPcap" "UninstallString"
1299 ${EnableX64FSRedirection}
1303 ${UnStrRep} $2 '$1' '\Uninstall.exe' ''
1304 ${UnStrRep} $3 '$2' '"' ''
1305 ExecWait '$1 _?=$3' $0
1306 DetailPrint "USBPcap uninstaller returned $0"
1308 Delete "$3\Uninstall.exe"
1309 Delete "$INSTDIR\extcap\wireshark\USBPcapCMD.exe"
1316 Section "Uninstall" un
.SecUinstall
1317 ;-------------------------------------------
1319 ; UnInstall for every user
1322 SetShellVarContext all
1324 !insertmacro IsWiresharkRunning
1326 Push "${EXECUTABLE_MARKER}"
1327 Push "${PROGRAM_NAME}"
1341 !ifdef MMDBRESOLVE_EXE
1346 ${DoUntil} $EXECUTABLE ==
${EXECUTABLE_MARKER}
1348 ; IsWiresharkRunning should make sure everything is closed down so we *shouldn't* run
1349 ; into any problems here.
1350 Delete "$INSTDIR\$EXECUTABLE.exe"
1351 IfErrors 0 deletionSuccess
1352 MessageBox MB_OK "$EXECUTABLE.exe could not be removed. Is it in use?" /SD
IDOK IDOK 0
1353 Abort "$EXECUTABLE.exe could not be removed. Aborting the uninstall process."
1361 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}"
1362 DeleteRegKey HKEY_LOCAL_MACHINE "Software\${PROGRAM_NAME}"
1363 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME}.exe"
1365 Call un
.Disassociate
1367 DeleteRegKey HKCR ${WIRESHARK_ASSOC}
1368 DeleteRegKey HKCR "${WIRESHARK_ASSOC}\Shell\open\command"
1369 DeleteRegKey HKCR "${WIRESHARK_ASSOC}\DefaultIcon"
1371 Delete "$INSTDIR\*.dll"
1372 Delete "$INSTDIR\*.exe"
1373 Delete "$INSTDIR\*.html"
1374 Delete "$INSTDIR\*.qm"
1375 Delete "$INSTDIR\accessible\*.*"
1376 Delete "$INSTDIR\AUTHORS-SHORT"
1377 Delete "$INSTDIR\COPYING*"
1378 Delete "$INSTDIR\audio\*.*"
1379 Delete "$INSTDIR\bearer\*.*"
1380 Delete "$INSTDIR\diameter\*.*"
1381 Delete "$INSTDIR\extcap\androiddump.*"
1382 Delete "$INSTDIR\extcap\ciscodump.*"
1383 Delete "$INSTDIR\extcap\etwdump.*"
1384 Delete "$INSTDIR\extcap\randpktdump.*"
1385 Delete "$INSTDIR\extcap\sshdump.*"
1386 Delete "$INSTDIR\extcap\udpdump.*"
1387 Delete "$INSTDIR\extcap\wifidump.*"
1388 Delete "$INSTDIR\gpl-2.0-standalone.html"
1389 Delete "$INSTDIR\Acknowledgements.md"
1390 Delete "$INSTDIR\generic\*.*"
1391 Delete "$INSTDIR\help\*.*"
1392 Delete "$INSTDIR\iconengines\*.*"
1393 Delete "$INSTDIR\imageformats\*.*"
1394 Delete "$INSTDIR\mediaservice\*.*"
1395 Delete "$INSTDIR\multimedia\*.*"
1396 Delete "$INSTDIR\networkinformation\*.*"
1397 Delete "$INSTDIR\platforms\*.*"
1398 Delete "$INSTDIR\playlistformats\*.*"
1399 Delete "$INSTDIR\printsupport\*.*"
1400 Delete "$INSTDIR\share\glib-2.0\schemas\*.*"
1401 Delete "$INSTDIR\snmp\*.*"
1402 Delete "$INSTDIR\snmp\mibs\*.*"
1403 Delete "$INSTDIR\styles\translations\*.*"
1404 Delete "$INSTDIR\styles\*.*"
1405 Delete "$INSTDIR\protobuf\*.*"
1406 Delete "$INSTDIR\tls\*.*"
1407 Delete "$INSTDIR\tpncp\*.*"
1408 Delete "$INSTDIR\translations\*.*"
1409 Delete "$INSTDIR\ui\*.*"
1410 Delete "$INSTDIR\wimaxasncp\*.*"
1411 Delete "$INSTDIR\ws.css"
1412 ; previous versions installed these files
1413 Delete "$INSTDIR\*.manifest"
1414 ; previous versions installed this file
1415 Delete "$INSTDIR\AUTHORS-SHORT-FORMAT"
1416 Delete "$INSTDIR\README*"
1417 Delete "$INSTDIR\NEWS.txt"
1418 Delete "$INSTDIR\manuf"
1419 Delete "$INSTDIR\wka"
1420 Delete "$INSTDIR\services"
1421 Delete "$INSTDIR\pdml2html.xsl"
1422 Delete "$INSTDIR\pcrepattern.3.txt"
1423 Delete "$INSTDIR\user-guide.chm"
1424 Delete "$INSTDIR\example_snmp_users_file"
1425 Delete "$INSTDIR\ipmap.html"
1426 Delete "$INSTDIR\radius\*.*"
1427 Delete "$INSTDIR\dtds\*.*"
1428 Delete "$INSTDIR\browser_sslkeylog.lua"
1429 Delete "$INSTDIR\console.lua"
1430 Delete "$INSTDIR\dtd_gen.lua"
1431 Delete "$INSTDIR\init.lua"
1432 Delete "$INSTDIR\release-notes.html"
1434 RMDir "$INSTDIR\accessible"
1435 RMDir "$INSTDIR\audio"
1436 RMDir "$INSTDIR\bearer"
1437 RMDir "$INSTDIR\extcap"
1438 RMDir "$INSTDIR\extcap"
1439 RMDir "$INSTDIR\iconengines"
1440 RMDir "$INSTDIR\imageformats"
1441 RMDir "$INSTDIR\mediaservice"
1442 RMDir "$INSTDIR\multimedia"
1443 RMDir "$INSTDIR\networkinformation"
1444 RMDir "$INSTDIR\platforms"
1445 RMDir "$INSTDIR\playlistformats"
1446 RMDir "$INSTDIR\printsupport"
1447 RMDir "$INSTDIR\styles\translations"
1448 RMDir "$INSTDIR\styles"
1449 RMDir "$SMPROGRAMS\${PROGRAM_NAME}"
1450 RMDir "$INSTDIR\help"
1451 RMDir "$INSTDIR\generic"
1452 RMDir /r
"$INSTDIR\Wireshark User's Guide"
1453 RMDir "$INSTDIR\diameter"
1454 RMDir "$INSTDIR\snmp\mibs"
1455 RMDir "$INSTDIR\snmp"
1456 RMDir "$INSTDIR\radius"
1457 RMDir "$INSTDIR\dtds"
1458 RMDir "$INSTDIR\protobuf"
1459 RMDir "$INSTDIR\tls"
1460 RMDir "$INSTDIR\tpncp"
1461 RMDir "$INSTDIR\translations"
1463 RMDir "$INSTDIR\wimaxasncp"
1466 SectionEnd ; "Uinstall"
1468 Section "Un.Plugins" un
.SecPlugins
1469 ;-------------------------------------------
1471 ;Delete "$INSTDIR\plugins\${VERSION}\*.*"
1472 ;Delete "$INSTDIR\plugins\*.*"
1473 ;RMDir "$INSTDIR\plugins\${VERSION}"
1474 ;RMDir "$INSTDIR\plugins"
1475 RMDir /r
"$INSTDIR\plugins"
1478 Section "Un.Global Profiles" un
.SecProfiles
1479 ;-------------------------------------------
1481 RMDir /r
"$INSTDIR\profiles"
1484 Section "Un.Global Settings" un
.SecGlobalSettings
1485 ;-------------------------------------------
1487 Delete "$INSTDIR\cfilters"
1488 Delete "$INSTDIR\colorfilters"
1489 Delete "$INSTDIR\dfilters"
1490 Delete "$INSTDIR\enterprises.tsv"
1491 Delete "$INSTDIR\smi_modules"
1495 Section /o
"Un.Personal Settings" un
.SecPersonalSettings
1496 ;-------------------------------------------
1498 SetShellVarContext current
1499 Delete "$APPDATA\${PROGRAM_NAME}\*.*"
1500 RMDir "$APPDATA\${PROGRAM_NAME}"
1501 DeleteRegKey HKCU "Software\${PROGRAM_NAME}"
1504 ;VAR un.NPCAP_UNINSTALL
1506 Section /o
"Un.Npcap" un
.SecNpcap
1507 ;-------------------------------------------
1509 ReadRegStr $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NpcapInst" "UninstallString"
1510 ;IfErrors un.lbl_npcap_notinstalled ;if RegKey is unavailable, Npcap is not installed
1512 ;MessageBox MB_OK "Npcap $1" /SD IDOK
1514 DetailPrint "Npcap uninstaller returned $0"
1517 ;un.lbl_npcap_notinstalled:
1520 Section "-Un.Finally"
1521 ;-------------------------------------------
1524 !insertmacro UpdateIcons
1526 ; this test must be done after all other things uninstalled (e.g. Global Settings)
1527 IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
1528 MessageBox MB_OK "Unable to remove $INSTDIR." /SD
IDOK IDOK 0 ; skipped if dir doesn't exist
1532 ; Sign our installer and uninstaller during compilation.
1533 !ifdef ENABLE_SIGNED_NSIS
1534 !finalize 'sign-wireshark.bat "%1"' =
0 ; %1 is replaced by the installer exe to be signed.
1535 !uninstfinalize 'sign-wireshark.bat "%1"' =
0 ; %1 is replaced by the uninstaller exe to be signed.
1538 ; ============================================================================
1539 ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
1540 ; ============================================================================
1541 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1543 !insertmacro MUI_DESCRIPTION_TEXT
${SecWiresharkQt} "The main network protocol analyzer application."
1545 !insertmacro MUI_DESCRIPTION_TEXT
${SecTShark} "Text based network protocol analyzer."
1547 !insertmacro MUI_DESCRIPTION_TEXT
${SecExtcapGroup} "External Capture Interfaces"
1548 !insertmacro MUI_DESCRIPTION_TEXT
${SecAndroiddump} "Provide capture interfaces from Android devices."
1549 !ifdef BUILD_etwdump
1550 !insertmacro MUI_DESCRIPTION_TEXT
${SecEtwdump} "Provide an interface to read Event Tracing for Windows (ETW) event trace (ETL)."
1552 !insertmacro MUI_DESCRIPTION_TEXT
${SecRandpktdump} "Provide an interface to the random packet generator. (see also randpkt)"
1554 !insertmacro MUI_DESCRIPTION_TEXT
${SecSshdump} "Provide remote capture through SSH. (tcpdump, Cisco EPC, wifi)"
1556 !insertmacro MUI_DESCRIPTION_TEXT
${SecUDPdump} "Provide capture interface to receive UDP packets streamed from network devices."
1558 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1560 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1561 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecUinstall
} "Uninstall all ${PROGRAM_NAME} components."
1562 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecPlugins
} "Uninstall all Plugins (even from previous ${PROGRAM_NAME} versions)."
1563 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecProfiles
} "Uninstall all global configuration profiles."
1564 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecGlobalSettings
} "Uninstall global settings like: $INSTDIR\cfilters"
1565 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecPersonalSettings
} "Delete personal configuration folder: $APPDATA\${PROGRAM_NAME}."
1566 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecNpcap
} "Call Npcap's uninstall program."
1567 !insertmacro MUI_DESCRIPTION_TEXT
${un
.SecUSBPcap
} "Call USBPcap's uninstall program."
1568 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1570 ; ============================================================================
1571 ; Callback functions
1572 ; ============================================================================
1577 ; Called from fnc_AdditionalTasksPage_Create via DisplayAdditionalTasksPage.
1578 Function InitAdditionalTasksPage
1579 ; We've created the Additional tasks page. Update our control states
1580 ; before they are shown.
1581 ; We set XXX_STATE -> XxxCheckBox here and go the other direction below.
1582 ${NSD_SetState} $hCtl_AdditionalTasksPage_StartMenuCheckBox $START_MENU_STATE
1583 ${NSD_SetState} $hCtl_AdditionalTasksPage_DesktopIconCheckBox $DESKTOP_ICON_STATE
1584 ${NSD_SetState} $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $FILE_ASSOCIATE_STATE
1586 StrCpy $QT_SELECTED 0
1587 ${If} ${SectionIsSelected} ${SecWiresharkQt}
1588 StrCpy $QT_SELECTED 1
1590 EnableWindow
$hCtl_AdditionalTasksPage_CreateShortcutsLabel $QT_SELECTED
1591 EnableWindow
$hCtl_AdditionalTasksPage_StartMenuCheckBox $QT_SELECTED
1592 EnableWindow
$hCtl_AdditionalTasksPage_DesktopIconCheckBox $QT_SELECTED
1594 EnableWindow
$hCtl_AdditionalTasksPage_ExtensionsLabel $QT_SELECTED
1595 EnableWindow
$hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $QT_SELECTED
1596 EnableWindow
$hCtl_AdditionalTasksPage_FileExtensionsLabel $QT_SELECTED
1599 Function LeaveAdditionalTasksPage
1600 ; We're leaving the Additional tasks page. Get our control states
1601 ; before they're destroyed.
1602 ; We set XxxCheckBox -> XXX_STATE here and go the other direction above.
1603 ${NSD_GetState} $hCtl_AdditionalTasksPage_StartMenuCheckBox $START_MENU_STATE
1604 ${NSD_GetState} $hCtl_AdditionalTasksPage_DesktopIconCheckBox $DESKTOP_ICON_STATE
1605 ${NSD_GetState} $hCtl_AdditionalTasksPage_AssociateExtensionsCheckBox $FILE_ASSOCIATE_STATE
1610 Var NPCAP_NAME
; DisplayName from Npcap installation
1611 Var WINPCAP_NAME
; DisplayName from WinPcap installation
1612 Var NPCAP_DISPLAY_VERSION
; DisplayVersion from Npcap installation
1613 Var USBPCAP_NAME
; DisplayName from USBPcap installation
1615 Function myShowCallback
1618 ; detect if WinPcap should be installed
1619 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 4" "Text" "Install Npcap ${NPCAP_PACKAGE_VERSION}"
1620 ReadRegStr $NPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NpcapInst" "DisplayName"
1621 IfErrors 0 lbl_npcap_installed
1622 ; check also if WinPcap is installed
1623 ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
1624 IfErrors 0 lbl_winpcap_installed
;if RegKey is available, WinPcap is already installed
1625 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 2" "Text" "Neither of these are installed"
1626 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 2" "Flags" "DISABLED"
1627 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old Npcap or WinPcap versions)"
1630 lbl_npcap_installed:
1631 ReadRegStr $NPCAP_DISPLAY_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NpcapInst" "DisplayVersion"
1632 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 1" "Text" "Currently installed Npcap version"
1633 StrCmp $NPCAP_NAME "Npcap" 0 +3
1634 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 2" "Text" "Npcap $NPCAP_DISPLAY_VERSION"
1636 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 2" "Text" "$NPCAP_NAME"
1638 ; Compare the installed build against the one we have.
1639 StrCmp $NPCAP_DISPLAY_VERSION "" lbl_npcap_do_install
; Npcap wasn't installed improperly?
1640 ${VersionConvert} $NPCAP_DISPLAY_VERSION "" $R0 ; 0.99-r7 -> 0.99.114.7
1641 ${VersionConvert} "${NPCAP_PACKAGE_VERSION}" "" $R1
1642 ${VersionCompare} $R0 $R1 $1
1643 StrCmp $1 "2" lbl_npcap_do_install
1645 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 4" "State" "0"
1646 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 4" "Flags" "DISABLED"
1647 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Text" "If you wish to install Npcap, please uninstall $NPCAP_NAME manually first."
1648 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Flags" "DISABLED"
1651 lbl_winpcap_installed:
1652 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 2" "Text" "$WINPCAP_NAME"
1653 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 4" "State" "1"
1654 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_NAME may be uninstalled first."
1657 lbl_npcap_do_install:
1658 ; seems to be an old version, install newer one
1659 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 4" "State" "1"
1660 StrCmp $NPCAP_NAME "Npcap" 0 +3
1661 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Text" "The currently installed Npcap $NPCAP_DISPLAY_VERSION will be uninstalled first."
1663 WriteINIStr "$PLUGINSDIR\NpcapPage.ini" "Field 5" "Text" "The currently installed $NPCAP_NAME will be uninstalled first."
1667 ; detect if USBPcap should be installed
1668 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 4" "Text" "Install USBPcap ${USBPCAP_PACKAGE_VERSION}"
1670 ${DisableX64FSRedirection}
1673 ReadRegStr $USBPCAP_NAME HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\USBPcap" "DisplayName"
1675 ${EnableX64FSRedirection}
1678 IfErrors 0 lbl_usbpcap_installed
;if RegKey is available, USBPcap is already installed
1679 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 2" "Text" "USBPcap is currently not installed"
1680 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 2" "Flags" "DISABLED"
1681 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old USBPcap versions)"
1682 Goto lbl_usbpcap_done
1684 lbl_usbpcap_installed:
1685 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 2" "Text" "$USBPCAP_NAME"
1686 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 4" "State" "0"
1687 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 4" "Flags" "DISABLED"
1688 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 5" "Text" "If you wish to install USBPcap ${USBPCAP_PACKAGE_VERSION}, please uninstall $USBPCAP_NAME manually first."
1689 WriteINIStr "$PLUGINSDIR\USBPcapPage.ini" "Field 5" "Flags" "DISABLED"
1690 Goto lbl_usbpcap_done