Pop $R1
Pop $R0
+; Force the icon cache to refresh
+; http://superuser.com/questions/499078/refresh-icon-cache-without-rebooting
+IfFileExists "$SYSDIR\ie4uinit.exe" 0 +2
+Exec '"$SYSDIR\ie4uinit.exe" -ClearIconCache'
+
!macroend
; ============================================================================
DeleteRegKey HKCR ${WIRESHARK_ASSOC}
DeleteRegKey HKCR "${WIRESHARK_ASSOC}\Shell\open\command"
DeleteRegKey HKCR "${WIRESHARK_ASSOC}\DefaultIcon"
-!insertmacro UpdateIcons
Delete "$INSTDIR\etc\gtk-2.0\*.*"
Delete "$INSTDIR\etc\gtk-3.0\*.*"
Section "-Un.Finally"
;-------------------------------------------
SectionIn 1 2
+
+!insertmacro UpdateIcons
+
; this test must be done after all other things uninstalled (e.g. Global Settings)
IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
MessageBox MB_OK "Unable to remove $INSTDIR." /SD IDOK IDOK 0 ; skipped if dir doesn't exist
WriteRegStr HKCR "${WIRESHARK_ASSOC}\Shell\open\command" "" '"$INSTDIR\${PROGRAM_NAME}.exe" "%1"'
WriteRegStr HKCR "${WIRESHARK_ASSOC}\DefaultIcon" "" '"$INSTDIR\${PROGRAM_NAME}.exe",1'
-
+; We refresh the icon cache down in -Finally.
Call Associate
; if somethings added here, add it also to the uninstall section and the AdditionalTask page
-!insertmacro UpdateIcons
SecRequired_skip_FileExtensions:
; if running as a silent installer, don't try to install winpcap
Section "-Finally"
+!insertmacro UpdateIcons
+
; Compute and write the installation directory size
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0