aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/nsis/common.nsh5
-rwxr-xr-xpackaging/nsis/uninstall.nsi4
-rw-r--r--packaging/nsis/wireshark.nsi5
3 files changed, 11 insertions, 3 deletions
diff --git a/packaging/nsis/common.nsh b/packaging/nsis/common.nsh
index b05449aea2..ee2f373c02 100755
--- a/packaging/nsis/common.nsh
+++ b/packaging/nsis/common.nsh
@@ -61,6 +61,11 @@ UpdateIcons.quit_${UPDATEICONS_UNIQUE}:
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
; ============================================================================
diff --git a/packaging/nsis/uninstall.nsi b/packaging/nsis/uninstall.nsi
index 2de9e610b3..22ae242d79 100755
--- a/packaging/nsis/uninstall.nsi
+++ b/packaging/nsis/uninstall.nsi
@@ -133,7 +133,6 @@ Call un.Disassociate
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\*.*"
@@ -285,6 +284,9 @@ SectionEnd
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
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index 1c537c54df..9d6c559134 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -717,11 +717,10 @@ WriteRegStr HKCR ${WIRESHARK_ASSOC} "" "Wireshark capture file"
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
@@ -968,6 +967,8 @@ SectionEnd
Section "-Finally"
+!insertmacro UpdateIcons
+
; Compute and write the installation directory size
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0