7 ; Set the compression mechanism first.
8 ; As of NSIS 2.07, solid compression which makes installer about 1MB smaller
9 ; is no longer the default, so use the /SOLID switch.
10 ; This unfortunately is unknown to NSIS prior to 2.07 and creates an error.
11 ; So if you get an error here, please update to at least NSIS 2.07!
12 SetCompressor /SOLID lzma
14 InstType "un.Default (keep Personal Settings and WinPcap)"
15 InstType "un.All (remove all)"
17 ; Used to refresh the display of file association
18 !define SHCNE_ASSOCCHANGED 0x08000000
19 !define SHCNF_IDLIST 0
21 ; Used to add associations between file extensions and Wireshark
22 !define WIRESHARK_ASSOC "wireshark-capture-file"
24 ; ============================================================================
25 ; Header configuration
26 ; ============================================================================
27 ; The name of the installer
28 !define PROGRAM_NAME "Wireshark"
29 !if ${WIRESHARK_TARGET_PLATFORM} == "win32"
35 Name "${PROGRAM_NAME} ${VERSION} (${BITS}-bit)"
38 OutFile "wireshark-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.exe"
40 ; Icon of installer and uninstaller
41 Icon "..\..\image\wiresharkinst.ico"
42 UninstallIcon "..\..\image\wiresharkinst.ico"
44 ; Uninstall stuff (NSIS 2.08: "\r\n" don't work here)
45 !define MUI_UNCONFIRMPAGE_TEXT_TOP "The following Wireshark installation will be uninstalled. Click 'Next' to continue."
46 ; Uninstall stuff (this text isn't used with the MODERN_UI!)
47 ;UninstallText "This will uninstall Wireshark.\r\nBefore starting the uninstallation, make sure Wireshark is not running.\r\nClick 'Next' to continue."
53 ; ============================================================================
55 ; ============================================================================
56 ; The modern user interface will look much better than the common one.
57 ; However, as the development of the modern UI is still going on, and the script
58 ; syntax changes, you will need exactly that NSIS version, which this script is
59 ; made for. This is the current (December 2003) latest version: V2.0b4
60 ; If you are using a different version, it's not predictable what will happen.
63 ;!addplugindir ".\Plugins"
65 !define MUI_ICON "..\..\image\wiresharkinst.ico"
66 !define MUI_UNICON "..\..\image\wiresharkinst.ico"
68 !define MUI_COMPONENTSPAGE_SMALLDESC
69 !define MUI_FINISHPAGE_NOAUTOCLOSE
70 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
71 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Wireshark.\r\n\r\nBefore starting the installation, make sure Wireshark is not running.\r\n\r\nClick 'Next' to continue."
72 ;!define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network!"
73 ;!define MUI_FINISHPAGE_LINK_LOCATION "http://www.winpcap.org"
75 ; NSIS shows Readme files by opening the Readme file with the default application for
76 ; the file's extension. "README.win32" won't work in most cases, because extension "win32"
77 ; is usually not associated with an appropriate text editor. We should use extension "txt"
78 ; for a text file or "html" for an html README file.
79 !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt"
80 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show News"
81 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
82 !define MUI_FINISHPAGE_RUN "$INSTDIR\wireshark.exe"
83 !define MUI_FINISHPAGE_RUN_NOTCHECKED
87 !define MUI_PAGE_CUSTOMFUNCTION_SHOW myShowCallback
89 ; ============================================================================
91 ; ============================================================================
93 !insertmacro MUI_PAGE_WELCOME
94 !insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
95 !insertmacro MUI_PAGE_COMPONENTS
96 Page custom DisplayAdditionalTasksPage
97 !insertmacro MUI_PAGE_DIRECTORY
98 Page custom DisplayWinPcapPage
99 !insertmacro MUI_PAGE_INSTFILES
100 !insertmacro MUI_PAGE_FINISH
102 !insertmacro MUI_UNPAGE_WELCOME
103 !insertmacro MUI_UNPAGE_CONFIRM
104 !insertmacro MUI_UNPAGE_COMPONENTS
105 !insertmacro MUI_UNPAGE_INSTFILES
106 !insertmacro MUI_UNPAGE_FINISH
108 ; ============================================================================
110 ; ============================================================================
112 !insertmacro MUI_LANGUAGE "English"
114 ; ============================================================================
116 ; ============================================================================
118 ;Things that need to be extracted on first (keep these lines before any File command!)
119 ;Only useful for BZIP2 compression
121 ReserveFile "AdditionalTasksPage.ini"
122 ReserveFile "WinPcapPage.ini"
123 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
125 ; ============================================================================
127 ; ============================================================================
128 !include "Sections.nsh"
130 ; ========= Macro to unselect and disable a section =========
132 !macro DisableSection SECTION
135 SectionGetFlags "${SECTION}" $0
136 IntOp $0 $0 & ${SECTION_OFF}
137 IntOp $0 $0 | ${SF_RO}
138 SectionSetFlags "${SECTION}" $0
143 ; ========= Macro to enable (unreadonly) a section =========
144 !define SECTION_ENABLE 0xFFFFFFEF
145 !macro EnableSection SECTION
148 SectionGetFlags "${SECTION}" $0
149 IntOp $0 $0 & ${SECTION_ENABLE}
150 SectionSetFlags "${SECTION}" $0
155 ; ============================================================================
157 ; ============================================================================
158 !include "FileFunc.nsh"
160 !insertmacro GetParameters
161 !insertmacro GetOptions
163 ; ============================================================================
164 ; License page configuration
165 ; ============================================================================
166 LicenseText "Wireshark is distributed under the GNU General Public License."
167 LicenseData "..\..\COPYING"
169 ; ============================================================================
170 ; Component page configuration
171 ; ============================================================================
172 ComponentText "The following components are available for installation."
174 ; Component check boxes
175 ; Commented out for NSIS v 2.0
176 ; EnabledBitmap "..\..\image\nsis-checked.bmp"
177 ; DisabledBitmap "..\..\image\nsis-unchecked.bmp"
179 ; ============================================================================
180 ; Directory selection page configuration
181 ; ============================================================================
182 ; The text to prompt the user to enter a directory
183 DirText "Choose a directory in which to install Wireshark."
185 ; The default installation directory
186 !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
187 InstallDir $PROGRAMFILES64\Wireshark
189 InstallDir $PROGRAMFILES\Wireshark
192 ; See if this is an upgrade; if so, use the old InstallDir as default
193 InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\Wireshark "InstallDir"
196 ; ============================================================================
197 ; Install page configuration
198 ; ============================================================================
200 ShowUninstDetails show
202 ; ============================================================================
203 ; Functions and macros
204 ; ============================================================================
210 !define UPDATEICONS_UNIQUE ${__LINE__}
212 IfFileExists "$SYSDIR\shell32.dll" UpdateIcons.ok_shell32_${UPDATEICONS_UNIQUE} UpdateIcons.error_shell32_${UPDATEICONS_UNIQUE}
213 UpdateIcons.ok_shell32_${UPDATEICONS_UNIQUE}:
214 System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
215 Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
217 UpdateIcons.error_shell32_${UPDATEICONS_UNIQUE}:
218 MessageBox MB_OK|MB_ICONSTOP \
219 "Can't find 'shell32.dll' library. Impossible to update icons" \
221 Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
223 UpdateIcons.quit_${UPDATEICONS_UNIQUE}:
224 !undef UPDATEICONS_UNIQUE
232 ; $R0 should contain the prefix to associate to Wireshark
235 ReadRegStr $R1 HKCR $R0 ""
236 StrCmp $R1 "" Associate.doRegister
238 Associate.doRegister:
239 ;The extension is not associated to any program, we can do the link
240 WriteRegStr HKCR $R0 "" ${WIRESHARK_ASSOC}
246 ; $R0 should contain the prefix to unlink
249 ReadRegStr $R1 HKCR $R0 ""
250 StrCmp $R1 ${WIRESHARK_ASSOC} un.unlink.doUnlink
253 ; The extension is associated with Wireshark so, we must destroy this!
254 DeleteRegKey HKCR $R0
264 ; ============================================================================
266 ; ============================================================================
270 !if ${WIRESHARK_TARGET_PLATFORM} == "win64"
271 ; http://forums.winamp.com/printthread.php?s=16ffcdd04a8c8d52bee90c0cae273ac5&threadid=262873
272 ${IfNot} ${RunningX64}
273 MessageBox MB_OK "This version of Wireshark only runs on x64 machines.\nTry installing the 32-bit version instead."
278 ; Copied from http://nsis.sourceforge.net/Auto-uninstall_old_before_installing_new
279 ReadRegStr $OLD_UNINSTALLER HKLM \
280 "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" \
282 StrCmp $OLD_UNINSTALLER "" done
284 ReadRegStr $OLD_INSTDIR HKLM \
285 "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" \
287 StrCmp $OLD_INSTDIR "" done
289 ReadRegStr $OLD_DISPLAYNAME HKLM \
290 "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" \
292 StrCmp $OLD_DISPLAYNAME "" done
294 MessageBox MB_YESNOCANCEL|MB_ICONQUESTION \
295 "$OLD_DISPLAYNAME is already installed.\
296 $\n$\nWould you like to uninstall it first?" \
298 IDYES prep_uninstaller \
302 ; Copy the uninstaller to $TEMP and run it.
303 ; The uninstaller normally does this by itself, but doesn't wait around
304 ; for the executable to finish, which means ExecWait won't work correctly.
307 StrCpy $TMP_UNINSTALLER "$TEMP\wireshark_uninstaller.exe"
308 ; ...because we surround UninstallString in quotes.
309 StrCpy $0 $OLD_UNINSTALLER -1 1
310 StrCpy $1 "$TEMP\wireshark_uninstaller.exe"
312 System::Call 'kernel32::CopyFile(t r0, t r1, b r2) 1'
313 IfSilent silent_uninstall
314 ExecWait "$TMP_UNINSTALLER _?=$OLD_INSTDIR"
318 ExecWait "$TMP_UNINSTALLER /S _?=$OLD_INSTDIR"
321 Delete "$TMP_UNINSTALLER"
324 ;Extract InstallOptions INI files
325 !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
326 !insertmacro MUI_INSTALLOPTIONS_EXTRACT "WinpcapPage.ini"
329 Function DisplayAdditionalTasksPage
330 !insertmacro MUI_HEADER_TEXT "Select Additional Tasks" "Which additional tasks should be done?"
331 !insertmacro MUI_INSTALLOPTIONS_DISPLAY "AdditionalTasksPage.ini"
334 Function DisplayWinPcapPage
335 !insertmacro MUI_HEADER_TEXT "Install WinPcap?" "WinPcap is required to capture live network data. Should WinPcap be installed?"
336 !insertmacro MUI_INSTALLOPTIONS_DISPLAY "WinPcapPage.ini"
339 ; ============================================================================
340 ; Installation execution commands
341 ; ============================================================================
343 Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
344 ;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
347 ;-------------------------------------------
350 ; Install for every user
352 SetShellVarContext all
357 File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll"
358 !ifdef ENABLE_LIBWIRESHARK
359 File "..\..\epan\libwireshark.dll"
361 File "..\..\wsutil\libwsutil.dll"
362 File "${GTK_DIR}\bin\libgio-2.0-0.dll"
363 File "${GTK_DIR}\bin\libglib-2.0-0.dll"
364 File "${GTK_DIR}\bin\libgobject-2.0-0.dll"
365 File "${GTK_DIR}\bin\libgmodule-2.0-0.dll"
366 File "${GTK_DIR}\bin\libgthread-2.0-0.dll"
368 File "${GTK_DIR}\bin\iconv.dll"
370 File "${GTK_DIR}\bin\intl.dll"
372 File "${ZLIB_DIR}\zlib1.dll"
375 File "${C_ARES_DIR}\cares.dll"
378 File "${ADNS_DIR}\..\${MSVC_VARIANT}\adns\adns_dll.dll"
381 File "${PCRE_DIR}\bin\pcre3.dll"
382 File "${PCRE_DIR}\man\cat3\pcrepattern.3.txt"
385 File "${KFW_DIR}\bin\comerr32.dll"
386 File "${KFW_DIR}\bin\krb5_32.dll"
387 File "${KFW_DIR}\bin\k5sprt32.dll"
390 File "${GNUTLS_DIR}\bin\libgcrypt-11.dll"
391 File "${GNUTLS_DIR}\bin\libgnutls-26.dll"
392 File "${GNUTLS_DIR}\bin\libgnutls-extra-26.dll"
393 File "${GNUTLS_DIR}\bin\libgnutls-openssl-26.dll"
394 File "${GNUTLS_DIR}\bin\libgpg-error-0.dll"
395 File "${GNUTLS_DIR}\bin\libtasn1-3.dll"
398 File "${LUA_DIR}\lua5.1.dll"
399 File "..\..\epan\wslua\init.lua"
400 File "..\..\epan\wslua\console.lua"
401 File "..\..\epan\wslua\dtd_gen.lua"
404 File "${SMI_DIR}\lib\smi.dll"
407 File "..\..\README.win32"
408 File "..\..\doc\AUTHORS-SHORT"
412 File "..\..\services"
413 File "..\..\doc\ws.css"
414 File "..\..\doc\wireshark.html"
415 File "..\..\doc\wireshark-filter.html"
416 File "..\..\dumpcap.exe"
417 File "..\..\doc\dumpcap.html"
418 File "..\..\ipmap.html"
420 ; C-runtime redistributable
422 ; vcredist_x86.exe (MSVC V8) - copy and execute the redistributable installer
423 File "${VCREDIST_EXE}"
424 !if ${WIRESHARK_TARGET_PLATFORM} == "win32"
425 ExecWait '"$INSTDIR\vcredist_x86.exe"' $0
427 ; If the user already has the redistributable installed they will see a
428 ; Big Ugly Dialog by default, asking if they want to uninstall or repair.
429 ; Ideally we should add a checkbox for this somewhere. In the meantime,
430 ; just do a silent install.
431 ExecWait '"$INSTDIR\vcredist_x64.exe" /q' $0
432 !endif ; WIRESHARK_TARGET_PLATFORM
433 DetailPrint "vcredist_x86 returned $0"
436 ; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file
437 !echo "IF YOU GET AN ERROR HERE, check the MSVC_VARIANT setting in config.nmake: MSVC2005 vs. MSVC2005EE!"
440 !if ${MSVC_VARIANT} != "MSVC6"
441 !error "C-Runtime redistributable for this package not available / not redistributable!"
444 !endif ; VCREDIST_EXE
447 ; global config files - don't overwrite if already existing
448 ;IfFileExists cfilters dont_overwrite_cfilters
449 File "..\..\cfilters"
450 ;dont_overwrite_cfilters:
451 ;IfFileExists colorfilters dont_overwrite_colorfilters
452 File "..\..\colorfilters"
453 ;dont_overwrite_colorfilters:
454 ;IfFileExists dfilters dont_overwrite_dfilters
455 File "..\..\dfilters"
456 ;dont_overwrite_dfilters:
457 ;IfFileExists smi_modules dont_overwrite_smi_modules
458 File "..\..\smi_modules"
459 ;dont_overwrite_smi_modules:
463 ; Install the Diameter DTD and XML files in the "diameter" subdirectory
464 ; of the installation directory.
466 SetOutPath $INSTDIR\diameter
467 File "..\..\diameter\chargecontrol.xml"
468 File "..\..\diameter\dictionary.dtd"
469 File "..\..\diameter\dictionary.xml"
470 File "..\..\diameter\eap.xml"
471 File "..\..\diameter\Ericsson.xml"
472 File "..\..\diameter\etsie2e4.xml"
473 File "..\..\diameter\gqpolicy.xml"
474 File "..\..\diameter\imscxdx.xml"
475 File "..\..\diameter\mobileipv4.xml"
476 File "..\..\diameter\nasreq.xml"
477 File "..\..\diameter\sip.xml"
478 File "..\..\diameter\sunping.xml"
479 File "..\..\diameter\TGPPGmb.xml"
480 File "..\..\diameter\TGPPRx.xml"
481 File "..\..\diameter\TGPPSh.xml"
487 ; Install the RADIUS directory files in the "radius" subdirectory
488 ; of the installation directory.
490 SetOutPath $INSTDIR\radius
491 File "..\..\radius\README.radius_dictionary"
492 File "..\..\radius\dictionary"
493 File "..\..\radius\dictionary.3com"
494 File "..\..\radius\dictionary.3gpp"
495 File "..\..\radius\dictionary.3gpp2"
496 File "..\..\radius\dictionary.acc"
497 File "..\..\radius\dictionary.airespace"
498 File "..\..\radius\dictionary.alcatel"
499 File "..\..\radius\dictionary.alteon"
500 File "..\..\radius\dictionary.altiga"
501 File "..\..\radius\dictionary.alvarion"
502 File "..\..\radius\dictionary.apc"
503 File "..\..\radius\dictionary.aptis"
504 File "..\..\radius\dictionary.aruba"
505 File "..\..\radius\dictionary.ascend"
506 File "..\..\radius\dictionary.asn"
507 File "..\..\radius\dictionary.avaya"
508 File "..\..\radius\dictionary.azaire"
509 File "..\..\radius\dictionary.bay"
510 File "..\..\radius\dictionary.bintec"
511 File "..\..\radius\dictionary.bristol"
512 File "..\..\radius\dictionary.cablelabs"
513 File "..\..\radius\dictionary.cabletron"
514 File "..\..\radius\dictionary.chillispot"
515 File "..\..\radius\dictionary.cisco"
516 File "..\..\radius\dictionary.cisco.bbsm"
517 File "..\..\radius\dictionary.cisco.vpn3000"
518 File "..\..\radius\dictionary.cisco.vpn5000"
519 File "..\..\radius\dictionary.clavister"
520 File "..\..\radius\dictionary.colubris"
521 File "..\..\radius\dictionary.columbia_university"
522 File "..\..\radius\dictionary.compat"
523 File "..\..\radius\dictionary.cosine"
524 File "..\..\radius\dictionary.dhcp"
525 File "..\..\radius\dictionary.digium"
526 File "..\..\radius\dictionary.epygi"
527 File "..\..\radius\dictionary.ericsson"
528 File "..\..\radius\dictionary.erx"
529 File "..\..\radius\dictionary.extreme"
530 File "..\..\radius\dictionary.fortinet"
531 File "..\..\radius\dictionary.foundry"
532 File "..\..\radius\dictionary.freeradius"
533 File "..\..\radius\dictionary.freeradius.internal"
534 File "..\..\radius\dictionary.freeswitch"
535 File "..\..\radius\dictionary.gandalf"
536 File "..\..\radius\dictionary.garderos"
537 File "..\..\radius\dictionary.gemtek"
538 File "..\..\radius\dictionary.h3c"
539 File "..\..\radius\dictionary.hp"
540 File "..\..\radius\dictionary.huawei"
541 File "..\..\radius\dictionary.infonet"
542 File "..\..\radius\dictionary.ipunplugged"
543 File "..\..\radius\dictionary.issanni"
544 File "..\..\radius\dictionary.itk"
545 File "..\..\radius\dictionary.jradius"
546 File "..\..\radius\dictionary.juniper"
547 File "..\..\radius\dictionary.karlnet"
548 File "..\..\radius\dictionary.lancom"
549 File "..\..\radius\dictionary.livingston"
550 File "..\..\radius\dictionary.localweb"
551 File "..\..\radius\dictionary.lucent"
552 File "..\..\radius\dictionary.manzara"
553 File "..\..\radius\dictionary.merit"
554 File "..\..\radius\dictionary.microsoft"
555 File "..\..\radius\dictionary.mikrotik"
556 File "..\..\radius\dictionary.motorola"
557 File "..\..\radius\dictionary.navini"
558 File "..\..\radius\dictionary.netscreen"
559 File "..\..\radius\dictionary.networkphysics"
560 File "..\..\radius\dictionary.nexans"
561 File "..\..\radius\dictionary.nokia"
562 File "..\..\radius\dictionary.nokia.conflict"
563 File "..\..\radius\dictionary.nomadix"
564 File "..\..\radius\dictionary.nortel"
565 File "..\..\radius\dictionary.ntua"
566 File "..\..\radius\dictionary.openser"
567 File "..\..\radius\dictionary.packeteer"
568 File "..\..\radius\dictionary.patton"
569 File "..\..\radius\dictionary.propel"
570 File "..\..\radius\dictionary.prosoft"
571 File "..\..\radius\dictionary.quiconnect"
572 File "..\..\radius\dictionary.quintum"
573 File "..\..\radius\dictionary.redback"
574 File "..\..\radius\dictionary.redcreek"
575 File "..\..\radius\dictionary.rfc2865"
576 File "..\..\radius\dictionary.rfc2866"
577 File "..\..\radius\dictionary.rfc2867"
578 File "..\..\radius\dictionary.rfc2868"
579 File "..\..\radius\dictionary.rfc2869"
580 File "..\..\radius\dictionary.rfc3162"
581 File "..\..\radius\dictionary.rfc3576"
582 File "..\..\radius\dictionary.rfc3580"
583 File "..\..\radius\dictionary.rfc4072"
584 File "..\..\radius\dictionary.rfc4372"
585 File "..\..\radius\dictionary.rfc4675"
586 File "..\..\radius\dictionary.rfc4679"
587 File "..\..\radius\dictionary.rfc4818"
588 File "..\..\radius\dictionary.rfc4849"
589 File "..\..\radius\dictionary.rfc5090"
590 File "..\..\radius\dictionary.rfc5176"
591 File "..\..\radius\dictionary.riverstone"
592 File "..\..\radius\dictionary.roaringpenguin"
593 File "..\..\radius\dictionary.shasta"
594 File "..\..\radius\dictionary.shiva"
595 File "..\..\radius\dictionary.slipstream"
596 File "..\..\radius\dictionary.sofaware"
597 File "..\..\radius\dictionary.sonicwall"
598 File "..\..\radius\dictionary.springtide"
599 File "..\..\radius\dictionary.starent"
600 File "..\..\radius\dictionary.t_systems_nova"
601 File "..\..\radius\dictionary.telebit"
602 File "..\..\radius\dictionary.telkom"
603 File "..\..\radius\dictionary.trapeze"
604 File "..\..\radius\dictionary.tropos"
605 File "..\..\radius\dictionary.tunnel"
606 File "..\..\radius\dictionary.unisphere"
607 File "..\..\radius\dictionary.unix"
608 File "..\..\radius\dictionary.usr"
609 File "..\..\radius\dictionary.utstarcom"
610 File "..\..\radius\dictionary.valemount"
611 File "..\..\radius\dictionary.versanet"
612 File "..\..\radius\dictionary.vqp"
613 File "..\..\radius\dictionary.walabi"
614 File "..\..\radius\dictionary.waverider"
615 File "..\..\radius\dictionary.wimax"
616 File "..\..\radius\dictionary.wispr"
617 File "..\..\radius\dictionary.xedia"
618 File "..\..\radius\dictionary.xylan"
619 File "..\..\radius\dictionary.zyxel"
623 ; install the dtds in the dtds subdirectory
625 SetOutPath $INSTDIR\dtds
626 File "..\..\dtds\dc.dtd"
627 File "..\..\dtds\itunes.dtd"
628 File "..\..\dtds\mscml.dtd"
629 File "..\..\dtds\pocsettings.dtd"
630 File "..\..\dtds\presence.dtd"
631 File "..\..\dtds\reginfo.dtd"
632 File "..\..\dtds\rlmi.dtd"
633 File "..\..\dtds\rss.dtd"
634 File "..\..\dtds\smil.dtd"
635 File "..\..\dtds\xcap-caps.dtd"
636 File "..\..\dtds\xcap-error.dtd"
637 File "..\..\dtds\watcherinfo.dtd"
640 ; Install the TPNCP DAT file in the "tpncp" subdirectory
641 ; of the installation directory.
642 SetOutPath $INSTDIR\tpncp
643 File "..\..\tpncp\tpncp.dat"
646 ; install the wimaxasncp TLV definitions in the wimaxasncp subdirectory
648 SetOutPath $INSTDIR\wimaxasncp
649 File "..\..\wimaxasncp\dictionary.xml"
650 File "..\..\wimaxasncp\dictionary.dtd"
653 SetOutPath $INSTDIR\help
654 File "..\..\help\toc"
655 File "..\..\help\overview.txt"
656 File "..\..\help\getting_started.txt"
657 File "..\..\help\capturing.txt"
658 File "..\..\help\capture_filters.txt"
659 File "..\..\help\display_filters.txt"
660 File "..\..\help\faq.txt"
662 ; Write the uninstall keys for Windows
663 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "DisplayVersion" "${VERSION}"
664 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "DisplayName" "Wireshark ${VERSION}"
665 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "UninstallString" '"$INSTDIR\uninstall.exe"'
666 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "Publisher" "The Wireshark developer community, http://www.wireshark.org"
667 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "HelpLink" "mailto:wireshark-users@wireshark.org"
668 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "URLInfoAbout" "http://www.wireshark.org"
669 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "URLUpdateInfo" "http://www.wireshark.org/download/win32/"
670 WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "NoModify" 1
671 WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "NoRepair" 1
672 WriteUninstaller "uninstall.exe"
674 ; Write an entry for ShellExecute
675 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" "" '$INSTDIR\wireshark.exe'
676 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe" "Path" '$INSTDIR'
678 ; Create start menu entries (depending on additional tasks page)
679 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State"
680 StrCmp $0 "0" SecRequired_skip_StartMenu
682 ;CreateDirectory "$SMPROGRAMS\Wireshark"
683 ; To qoute "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp":
684 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
685 Delete "$SMPROGRAMS\Wireshark\Wireshark Web Site.lnk"
686 ;WriteINIStr "$SMPROGRAMS\Wireshark\Wireshark Web Site.url" "InternetShortcut" "URL" "http://www.wireshark.org/"
687 CreateShortCut "$SMPROGRAMS\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer"
688 ;CreateShortCut "$SMPROGRAMS\Wireshark\Wireshark Manual.lnk" "$INSTDIR\wireshark.html"
689 ;CreateShortCut "$SMPROGRAMS\Wireshark\Display Filters Manual.lnk" "$INSTDIR\wireshark-filter.html"
690 ;CreateShortCut "$SMPROGRAMS\Wireshark\Wireshark Program Directory.lnk" "$INSTDIR"
691 ;CreateShortCut "$SMPROGRAMS\Wireshark\Uninstall Wireshark.lnk" "$INSTDIR\uninstall.exe"
692 SecRequired_skip_StartMenu:
694 ; is command line option "/desktopicon" set?
696 ${GetOptions} $R0 "/desktopicon=" $R1
697 StrCmp $R1 "no" SecRequired_skip_DesktopIcon
698 StrCmp $R1 "yes" SecRequired_install_DesktopIcon
700 ; Create desktop icon (depending on additional tasks page and command line option)
701 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State"
702 StrCmp $0 "0" SecRequired_skip_DesktopIcon
703 SecRequired_install_DesktopIcon:
704 CreateShortCut "$DESKTOP\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer"
705 SecRequired_skip_DesktopIcon:
707 ; is command line option "/quicklaunchicon" set?
709 ${GetOptions} $R0 "/quicklaunchicon=" $R1
710 StrCmp $R1 "no" SecRequired_skip_QuickLaunchIcon
711 StrCmp $R1 "yes" SecRequired_install_QuickLaunchIcon
713 ; Create quick launch icon (depending on additional tasks page and command line option)
714 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State"
715 StrCmp $0 "0" SecRequired_skip_QuickLaunchIcon
716 SecRequired_install_QuickLaunchIcon:
717 CreateShortCut "$QUICKLAUNCH\Wireshark.lnk" "$INSTDIR\wireshark.exe" "" "$INSTDIR\wireshark.exe" 0 "" "" "The Wireshark Network Protocol Analyzer"
718 SecRequired_skip_QuickLaunchIcon:
720 ; Create File Extensions (depending on additional tasks page)
721 ReadINIStr $0 "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State"
722 StrCmp $0 "0" SecRequired_skip_FileExtensions
723 WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
724 WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\wireshark.exe" "%1"'
725 WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\wireshark.exe",1'
769 ; if somethings added here, add it also to the uninstall section and the AdditionalTask page
771 !insertmacro UpdateIcons
772 SecRequired_skip_FileExtensions:
774 ; if running as a silent installer, don't try to install winpcap
775 IfSilent SecRequired_skip_Winpcap
777 ; Install WinPcap (depending on winpcap page setting)
778 ReadINIStr $0 "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State"
779 StrCmp $0 "0" SecRequired_skip_Winpcap
780 ; Uinstall old WinPcap first
781 ReadRegStr $WINPCAP_UNINSTALL HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
782 IfErrors lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
783 ; from released version 3.1, WinPcap will uninstall an old version by itself
784 ;ExecWait '$WINPCAP_UNINSTALL' $0
785 ;DetailPrint "WinPcap uninstaller returned $0"
786 lbl_winpcap_notinstalled:
788 File "WinPcap_4_1_1.exe"
789 ExecWait '"$INSTDIR\WinPcap_4_1_1.exe"' $0
790 DetailPrint "WinPcap installer returned $0"
791 SecRequired_skip_Winpcap:
793 ; If no user profile exists for Wireshark but for Ethereal, copy it over
794 SetShellVarContext current
795 IfFileExists $APPDATA\Wireshark profile_done
796 IfFileExists $APPDATA\Ethereal 0 profile_done
797 ;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
798 CreateDirectory $APPDATA\Wireshark
799 CopyFiles $APPDATA\Ethereal\*.* $APPDATA\Wireshark
801 SetShellVarContext all
803 SectionEnd ; "Required"
806 Section "Wireshark" SecWireshark
807 ;-------------------------------------------
809 File "..\..\wireshark.exe"
810 File "${GTK_DIR}\bin\libgdk-win32-2.0-0.dll"
811 File "${GTK_DIR}\bin\libgdk_pixbuf-2.0-0.dll"
812 File "${GTK_DIR}\bin\libgtk-win32-2.0-0.dll"
813 File "${GTK_DIR}\bin\libatk-1.0-0.dll"
814 File "${GTK_DIR}\bin\libpango-1.0-0.dll"
815 File "${GTK_DIR}\bin\libpangowin32-1.0-0.dll"
816 !ifdef NEED_CAIRO_DLL
817 File "${GTK_DIR}\bin\libcairo-2.dll"
818 File "${GTK_DIR}\bin\libpangocairo-1.0-0.dll"
820 !ifdef NEED_LIBPNG_DLL
821 File "${GTK_DIR}\bin\libpng12-0.dll"
823 !ifdef NEED_LIBTIFF_DLL
824 File "${GTK_DIR}\bin\${TIFF_DLL}"
826 !ifdef NEED_LIBJPEG_DLL
827 File "${GTK_DIR}\bin\${JPEG_DLL}"
829 !ifdef NEED_FREETYPE_DLL
830 File "${GTK_DIR}\bin\libpangoft2-1.0-0.dll"
831 File "${GTK_DIR}\bin\${FREETYPE_DLL}"
833 !ifdef NEED_FONTCONFIG_DLL
834 File "${GTK_DIR}\bin\${FONTCONFIG_DLL}"
836 !ifdef NEED_EXPAT_DLL
837 File "${GTK_DIR}\bin\${EXPAT_DLL}"
839 SetOutPath $INSTDIR\etc\gtk-2.0
840 File "${GTK_DIR}\etc\gtk-2.0\*.*"
842 !if ${WIRESHARK_TARGET_PLATFORM} == "win32"
843 SetOutPath $INSTDIR\etc\pango
844 File "${GTK_DIR}\etc\pango\pango.*"
845 SetOutPath $INSTDIR\lib\gtk-2.0\${GTK_LIB_DIR}\loaders
846 File "${GTK_DIR}\lib\gtk-2.0\${GTK_LIB_DIR}\loaders\libpixbufloader-*.dll"
849 SetOutPath $INSTDIR\lib\gtk-2.0\${GTK_LIB_DIR}\engines
850 File "${GTK_DIR}\lib\gtk-2.0\${GTK_LIB_DIR}\engines\libpixmap.dll"
851 SetOutPath $INSTDIR\lib\gtk-2.0\modules
852 File "${GTK_DIR}\lib\gtk-2.0\modules\libgail.dll"
854 ; GTK MS-Windows Engine (GTK-Wimp)
855 SetOutPath $INSTDIR\${GTK_WIMP_DLLDST_DIR}
856 File "${GTK_WIMP_DLLSRC_DIR}\libwimp.dll"
857 SetOutPath $INSTDIR\${GTK_WIMP_RCDST_DIR}
858 File "${GTK_WIMP_RCSRC_DIR}\gtkrc"
860 SectionEnd ; "Wireshark"
864 Section "TShark" SecTShark
865 ;-------------------------------------------
867 File "..\..\tshark.exe"
868 File "..\..\doc\tshark.html"
871 SectionGroup "Plugins / Extensions" SecPluginsGroup
873 Section "Dissector Plugins" SecPlugins
874 ;-------------------------------------------
875 SetOutPath '$INSTDIR\plugins\${VERSION}'
876 File "..\..\plugins\asn1\asn1.dll"
877 File "..\..\plugins\docsis\docsis.dll"
878 File "..\..\plugins\ethercat\ethercat.dll"
879 File "..\..\plugins\giop\coseventcomm.dll"
880 File "..\..\plugins\giop\cosnaming.dll"
881 File "..\..\plugins\giop\parlay.dll"
882 File "..\..\plugins\giop\tango.dll"
883 File "..\..\plugins\gryphon\gryphon.dll"
884 File "..\..\plugins\irda\irda.dll"
885 File "..\..\plugins\m2m\m2m.dll"
886 File "..\..\plugins\opcua\opcua.dll"
887 File "..\..\plugins\profinet\profinet.dll"
888 File "..\..\plugins\sercosiii\sercosiii.dll"
889 File "..\..\plugins\unistim\unistim.dll"
890 File "..\..\plugins\wimax\wimax.dll"
891 File "..\..\plugins\wimaxasncp\wimaxasncp.dll"
894 Section "Tree Statistics Plugin" SecStatsTree
895 ;-------------------------------------------
896 SetOutPath '$INSTDIR\plugins\${VERSION}'
897 File "..\..\plugins\stats_tree\stats_tree.dll"
900 Section "Mate - Meta Analysis and Tracing Engine" SecMate
901 ;-------------------------------------------
902 SetOutPath '$INSTDIR\plugins\${VERSION}'
903 File "..\..\plugins\mate\mate.dll"
908 Section "SNMP MIBs" SecMIBs
909 ;-------------------------------------------
910 SetOutPath $INSTDIR\snmp\mibs
911 File "${NET_SNMP_DIR}\mibs\*.txt"
916 Section "SNMP MIBs" SecMIBs
917 ;-------------------------------------------
918 SetOutPath $INSTDIR\snmp\mibs
919 File "${SMI_DIR}\mibs\*"
923 SectionGroupEnd ; "Plugins / Extensions"
926 SectionGroup "Tools" SecToolsGroup
928 Section "Editcap" SecEditcap
929 ;-------------------------------------------
931 File "..\..\editcap.exe"
932 File "..\..\doc\editcap.html"
935 Section "Text2Pcap" SecText2Pcap
936 ;-------------------------------------------
938 File "..\..\text2pcap.exe"
939 File "..\..\doc\text2pcap.html"
942 Section "Mergecap" SecMergecap
943 ;-------------------------------------------
945 File "..\..\mergecap.exe"
946 File "..\..\doc\mergecap.html"
949 Section "Capinfos" SecCapinfos
950 ;-------------------------------------------
952 File "..\..\capinfos.exe"
953 File "..\..\doc\capinfos.html"
956 Section "Rawshark" SecRawshark
957 ;-------------------------------------------
959 File "..\..\rawshark.exe"
960 File "..\..\doc\rawshark.html"
963 SectionGroupEnd ; "Tools"
966 Section "User's Guide" SecUsersGuide
967 ;-------------------------------------------
969 File "user-guide.chm"
973 Section "Uninstall" un.SecUinstall
974 ;-------------------------------------------
977 ; UnInstall for every user
980 SetShellVarContext all
982 Delete "$INSTDIR\rawshark.exe"
983 IfErrors 0 NoRawsharkErrorMsg
984 MessageBox MB_OK "Please note: rawshark.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if rawshark.exe removed
985 Abort "Please note: rawshark.exe could not be removed, it's probably in use! Abort uninstall process!"
988 Delete "$INSTDIR\tshark.exe"
989 IfErrors 0 NoTSharkErrorMsg
990 MessageBox MB_OK "Please note: tshark.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if tshark.exe removed
991 Abort "Please note: tshark.exe could not be removed, it's probably in use! Abort uninstall process!"
994 Delete "$INSTDIR\wireshark.exe"
995 IfErrors 0 NoWiresharkErrorMsg
996 MessageBox MB_OK "Please note: wireshark.exe could not be removed, it's probably in use!" IDOK 0 ;skipped if wireshark.exe removed
997 Abort "Please note: wireshark.exe could not be removed, it's probably in use! Abort uninstall process!"
1000 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark"
1001 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Wireshark"
1002 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\wireshark.exe"
1047 DeleteRegKey HKCR ${WIRESHARK_ASSOC}
1048 DeleteRegKey HKCR "${WIRESHARK_ASSOC}\Shell\open\command"
1049 DeleteRegKey HKCR "${WIRESHARK_ASSOC}\DefaultIcon"
1050 !insertmacro UpdateIcons
1052 Delete "$INSTDIR\etc\gtk-2.0\*.*"
1053 Delete "$INSTDIR\etc\pango\*.*"
1054 Delete "$INSTDIR\lib\gtk-2.0\2.2.0\engines\*.*"
1055 Delete "$INSTDIR\lib\gtk-2.0\2.2.0\loaders\*.*"
1056 Delete "$INSTDIR\lib\gtk-2.0\2.2.0\immodules\*.*"
1057 Delete "$INSTDIR\lib\gtk-2.0\2.4.0\engines\*.*"
1058 Delete "$INSTDIR\lib\gtk-2.0\2.4.0\loaders\*.*"
1059 Delete "$INSTDIR\lib\gtk-2.0\2.4.0\immodules\*.*"
1060 Delete "$INSTDIR\lib\gtk-2.0\2.10.0\engines\*.*"
1061 Delete "$INSTDIR\lib\gtk-2.0\2.10.0\loaders\*.*"
1062 Delete "$INSTDIR\lib\gtk-2.0\2.10.0\immodules\*.*"
1063 Delete "$INSTDIR\lib\gtk-2.0\modules\*.*"
1064 Delete "$INSTDIR\lib\pango\1.2.0\modules\*.*"
1065 Delete "$INSTDIR\lib\pango\1.4.0\modules\*.*"
1066 Delete "$INSTDIR\lib\pango\1.5.0\modules\*.*"
1067 Delete "$INSTDIR\share\themes\Default\gtk-2.0\*.*"
1068 Delete "$INSTDIR\help\*.*"
1069 Delete "$INSTDIR\diameter\*.*"
1070 Delete "$INSTDIR\snmp\mibs\*.*"
1071 Delete "$INSTDIR\snmp\*.*"
1072 Delete "$INSTDIR\tpncp\*.*"
1073 Delete "$INSTDIR\wimaxasncp\*.*"
1074 Delete "$INSTDIR\*.exe"
1075 Delete "$INSTDIR\*.dll"
1076 Delete "$INSTDIR\*.html"
1077 Delete "$INSTDIR\ws.css"
1078 Delete "$INSTDIR\COPYING"
1079 Delete "$INSTDIR\AUTHORS-SHORT"
1080 ; previous versions installed these files
1081 Delete "$INSTDIR\*.manifest"
1082 ; previous versions installed this file
1083 Delete "$INSTDIR\AUTHORS-SHORT-FORMAT"
1084 Delete "$INSTDIR\README*"
1085 Delete "$INSTDIR\NEWS.txt"
1086 Delete "$INSTDIR\manuf"
1087 Delete "$INSTDIR\services"
1088 Delete "$INSTDIR\pcrepattern.3.txt"
1089 Delete "$INSTDIR\user-guide.chm"
1090 Delete "$INSTDIR\example_snmp_users_file"
1091 Delete "$INSTDIR\ipmap.html"
1092 Delete "$INSTDIR\radius\*.*"
1093 Delete "$INSTDIR\dtds\*.*"
1094 Delete "$SMPROGRAMS\Wireshark\*.*"
1095 Delete "$SMPROGRAMS\Wireshark.lnk"
1096 Delete "$DESKTOP\Wireshark.lnk"
1097 Delete "$QUICKLAUNCH\Wireshark.lnk"
1099 RMDir "$INSTDIR\etc\gtk-2.0"
1100 RMDir "$INSTDIR\etc\pango"
1101 RMDir "$INSTDIR\etc"
1102 RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\engines"
1103 RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\loaders"
1104 RMDir "$INSTDIR\lib\gtk-2.0\2.2.0\immodules"
1105 RMDir "$INSTDIR\lib\gtk-2.0\2.2.0"
1106 RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\engines"
1107 RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\loaders"
1108 RMDir "$INSTDIR\lib\gtk-2.0\2.4.0\immodules"
1109 RMDir "$INSTDIR\lib\gtk-2.0\2.4.0"
1110 RMDir "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
1111 RMDir "$INSTDIR\lib\gtk-2.0\2.10.0\loaders"
1112 RMDir "$INSTDIR\lib\gtk-2.0\2.10.0\immodules"
1113 RMDir "$INSTDIR\lib\gtk-2.0\2.10.0"
1114 RMDir "$INSTDIR\lib\gtk-2.0\modules"
1115 RMDir "$INSTDIR\lib\gtk-2.0"
1116 RMDir "$INSTDIR\lib\pango\1.2.0\modules"
1117 RMDir "$INSTDIR\lib\pango\1.2.0"
1118 RMDir "$INSTDIR\lib\pango\1.4.0\modules"
1119 RMDir "$INSTDIR\lib\pango\1.4.0"
1120 RMDir "$INSTDIR\lib\pango\1.5.0\modules"
1121 RMDir "$INSTDIR\lib\pango\1.5.0"
1122 RMDir "$INSTDIR\lib\pango"
1123 RMDir "$INSTDIR\lib"
1124 RMDir "$INSTDIR\share\themes\Default\gtk-2.0"
1125 RMDir "$INSTDIR\share\themes\Default"
1126 RMDir "$INSTDIR\share\themes"
1127 RMDir "$INSTDIR\share"
1128 RMDir "$SMPROGRAMS\Wireshark"
1129 RMDir "$INSTDIR\help"
1130 RMDir "$INSTDIR\diameter"
1131 RMDir "$INSTDIR\snmp\mibs"
1132 RMDir "$INSTDIR\snmp"
1133 RMDir "$INSTDIR\radius"
1134 RMDir "$INSTDIR\dtds"
1135 RMDir "$INSTDIR\tpncp"
1136 RMDir "$INSTDIR\wimaxasncp"
1139 SectionEnd ; "Uinstall"
1141 Section "Un.Plugins" un.SecPlugins
1142 ;-------------------------------------------
1144 ;Delete "$INSTDIR\plugins\${VERSION}\*.*"
1145 ;Delete "$INSTDIR\plugins\*.*"
1146 ;RMDir "$INSTDIR\plugins\${VERSION}"
1147 ;RMDir "$INSTDIR\plugins"
1148 RMDir /r "$INSTDIR\plugins"
1151 Section "Un.Global Settings" un.SecGlobalSettings
1152 ;-------------------------------------------
1154 Delete "$INSTDIR\cfilters"
1155 Delete "$INSTDIR\colorfilters"
1156 Delete "$INSTDIR\dfilters"
1157 Delete "$INSTDIR\init.lua"
1158 Delete "$INSTDIR\console.lua"
1159 Delete "$INSTDIR\dtd_gen.lua"
1160 Delete "$INSTDIR\smi_modules"
1164 Section /o "Un.Personal Settings" un.SecPersonalSettings
1165 ;-------------------------------------------
1167 SetShellVarContext current
1168 Delete "$APPDATA\Wireshark\*.*"
1169 RMDir "$APPDATA\Wireshark"
1172 ;VAR un.WINPCAP_UNINSTALL
1174 Section /o "Un.WinPcap" un.SecWinPcap
1175 ;-------------------------------------------
1177 ReadRegStr $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "UninstallString"
1178 ;IfErrors un.lbl_winpcap_notinstalled ;if RegKey is unavailable, WinPcap is not installed
1179 ;MessageBox MB_OK "WinPcap $1"
1181 DetailPrint "WinPcap uninstaller returned $0"
1183 ;un.lbl_winpcap_notinstalled:
1186 Section "-Un.Finally"
1187 ;-------------------------------------------
1189 ; this test must be done after all other things uninstalled (e.g. Global Settings)
1190 IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
1191 MessageBox MB_OK "Please note: The directory $INSTDIR could not be removed!" IDOK 0 ; skipped if dir doesn't exist
1196 ; ============================================================================
1197 ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
1198 ; ============================================================================
1199 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1201 !insertmacro MUI_DESCRIPTION_TEXT ${SecWireshark} "${PROGRAM_NAME} is a GUI network protocol analyzer."
1203 !insertmacro MUI_DESCRIPTION_TEXT ${SecTShark} "TShark is a text based network protocol analyzer."
1204 !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} "Some plugins and extensions for both Wireshark and TShark."
1205 !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "Plugins with some extended dissections."
1206 !insertmacro MUI_DESCRIPTION_TEXT ${SecStatsTree} "Plugin for some extended statistics."
1207 !insertmacro MUI_DESCRIPTION_TEXT ${SecMate} "Plugin - Meta Analysis and Tracing Engine (Experimental)."
1209 !insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection."
1212 !insertmacro MUI_DESCRIPTION_TEXT ${SecMIBs} "SNMP MIBs for better SNMP dissection."
1214 !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsGroup} "Additional command line based tools."
1215 !insertmacro MUI_DESCRIPTION_TEXT ${SecEditCap} "Editcap is a program that reads a capture file and writes some or all of the packets into another capture file."
1216 !insertmacro MUI_DESCRIPTION_TEXT ${SecText2Pcap} "Text2pcap is a program that reads in an ASCII hex dump and writes the data into a libpcap-style capture file."
1217 !insertmacro MUI_DESCRIPTION_TEXT ${SecMergecap} "Mergecap is a program that combines multiple saved capture files into a single output file"
1218 !insertmacro MUI_DESCRIPTION_TEXT ${SecCapinfos} "Capinfos is a program that provides information on capture files."
1219 !insertmacro MUI_DESCRIPTION_TEXT ${SecRawshark} "Rawshark is a raw packet filter."
1221 !insertmacro MUI_DESCRIPTION_TEXT ${SecUsersGuide} "Install the user's guide, so an internet connection is not required to read the help pages."
1223 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1225 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
1226 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} "Uninstall all Wireshark components."
1227 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPlugins} "Uninstall all Plugins (even from previous Wireshark versions)."
1228 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecGlobalSettings} "Uninstall global settings like: $INSTDIR\cfilters"
1229 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} "Uninstall personal settings like your preferences file from your profile: $PROFILE."
1230 !insertmacro MUI_DESCRIPTION_TEXT ${un.SecWinPcap} "Call WinPcap's uninstall program."
1231 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
1233 ; ============================================================================
1234 ; Callback functions
1235 ; ============================================================================
1237 ; Disable File extensions if Wireshark isn't selected
1238 Function .onSelChange
1240 SectionGetFlags ${SecWireshark} $0
1242 IntCmp $0 0 onSelChange.unselect
1243 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 1
1244 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" ""
1245 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" ""
1246 Goto onSelChange.end
1248 onSelChange.unselect:
1249 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "State" 0
1250 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 6" "Flags" "DISABLED"
1251 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 7" "Flags" "DISABLED"
1252 Goto onSelChange.end
1260 !include "GetWindowsVersion.nsh"
1261 !include WinMessages.nsh
1262 !include "VersionCompare.nsh"
1264 Var WINPCAP_NAME ; DisplayName from WinPcap installation
1265 Var WINPCAP_VERSION ; DisplayVersion from WinPcap installation
1267 Function myShowCallback
1269 ; Get the Windows version
1270 Call GetWindowsVersion
1271 Pop $R0 ; Windows Version
1273 ; Check if we're able to run with this version
1274 StrCmp $R0 '95' lbl_winversion_unsupported
1275 StrCmp $R0 '98' lbl_winversion_unsupported
1276 StrCmp $R0 'ME' lbl_winversion_unsupported
1277 StrCmp $R0 'NT 4.0' lbl_winversion_unsupported_nt4
1278 Goto lbl_winversion_supported
1279 lbl_winversion_unsupported:
1281 "Windows $R0 is no longer supported. The last known version working with 98/ME was Ethereal 0.99.0." \
1285 lbl_winversion_unsupported_nt4:
1287 "Windows $R0 is no longer supported. The last known version working with NT 4.0 was Wireshark 0.99.4." \
1291 lbl_winversion_supported:
1293 ; detect if WinPcap should be installed
1294 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Text" "Install WinPcap 4.1.1"
1295 ReadRegStr $WINPCAP_NAME HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayName"
1296 IfErrors 0 lbl_winpcap_installed ;if RegKey is available, WinPcap is already installed
1297 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "WinPcap is currently not installed"
1298 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Flags" "DISABLED"
1299 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "(Use Add/Remove Programs first to uninstall any undetected old WinPcap versions)"
1300 Goto lbl_winpcap_done
1302 lbl_winpcap_installed:
1303 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 2" "Text" "$WINPCAP_NAME"
1304 ; Compare the installed build against the one we have.
1305 ReadRegStr $WINPCAP_VERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" "DisplayVersion"
1306 StrCmp $WINPCAP_VERSION "" lbl_winpcap_do_install ; WinPcap is really old(?) or installed improperly.
1307 ${VersionCompare} $WINPCAP_VERSION "4.1.0.1753" $1 ; WinPcap 4.1.1
1308 StrCmp $1 "2" lbl_winpcap_do_install
1310 ;lbl_winpcap_dont_install:
1311 ; The installed version is >= to what we have, so don't install
1312 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1313 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If selected, the currently installed $WINPCAP_NAME will be uninstalled first."
1314 Goto lbl_winpcap_done
1316 ;lbl_winpcap_dont_upgrade:
1317 ; force the user to upgrade by hand
1318 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "0"
1319 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "Flags" "DISABLED"
1320 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "If you wish to install WinPcap 4.1.1, please uninstall $WINPCAP_NAME manually first."
1321 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Flags" "DISABLED"
1322 Goto lbl_winpcap_done
1324 lbl_winpcap_do_install:
1325 ; seems to be an old version, install newer one
1326 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 4" "State" "1"
1327 WriteINIStr "$PLUGINSDIR\WinPcapPage.ini" "Field 5" "Text" "The currently installed $WINPCAP_NAME will be uninstalled first."
1331 ; if Wireshark was previously installed, unselect previously not installed icons etc.
1332 ; detect if Wireshark is already installed ->
1333 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark" "UninstallString"
1334 IfErrors lbl_wireshark_notinstalled ;if RegKey is unavailable, Wireshark is not installed
1336 ; only select Start Menu Group, if previously installed
1337 ; (we use the "all users" start menu, so select it first)
1338 SetShellVarContext all
1339 IfFileExists "$SMPROGRAMS\Wireshark\Wireshark.lnk" lbl_have_startmenu
1340 IfFileExists "$SMPROGRAMS\Wireshark.lnk" lbl_have_startmenu
1341 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 2" "State" "0"
1344 ; only select Desktop Icon, if previously installed
1345 IfFileExists "$DESKTOP\Wireshark.lnk" lbl_have_desktopicon
1346 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 3" "State" "0"
1347 lbl_have_desktopicon:
1349 ; only select Quick Launch Icon, if previously installed
1350 IfFileExists "$QUICKLAUNCH\Wireshark.lnk" lbl_have_quicklaunchicon
1351 WriteINIStr "$PLUGINSDIR\AdditionalTasksPage.ini" "Field 4" "State" "0"
1352 lbl_have_quicklaunchicon:
1354 lbl_wireshark_notinstalled: