Bug 1284517 - Touch the Start Menu shortcut on Windows 8 and later in the installer so the Start Menu tile cache gets cleared. r?rstrong draft
authorJared Wein <jwein@mozilla.com>
Sat, 09 Jul 2016 22:56:06 -0400
changeset 386032 9359b7b9c059db50ee312e3711a01f735f7b823e
parent 385190 b7c937889aacde63e7fef321b58d77b5cc31a149
child 525019 cb7be9e63e5d123537100eaf91c7d994d1d1ce96
push id22600
push userjwein@mozilla.com
push dateSun, 10 Jul 2016 02:56:19 +0000
reviewersrstrong
bugs1284517
milestone50.0a1
Bug 1284517 - Touch the Start Menu shortcut on Windows 8 and later in the installer so the Start Menu tile cache gets cleared. r?rstrong MozReview-Commit-ID: FwjVw0BAGdn
browser/installer/windows/nsis/installer.nsi
browser/installer/windows/nsis/shared.nsh
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -537,16 +537,23 @@ Section "-Application" APP_IDX
         ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true"
       ${EndIf}
       ${LogMsg} "Added Shortcut: $SMPROGRAMS\${BrandFullName}.lnk"
     ${Else}
       ${LogMsg} "** ERROR Adding Shortcut: $SMPROGRAMS\${BrandFullName}.lnk"
     ${EndIf}
   ${EndIf}
 
+  ; Update lastwritetime of the Start Menu shortcut to clear the tile cache.
+  ${If} ${AtLeastWin8}
+  ${AndIf} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk"
+    FileOpen $0 "$SMPROGRAMS\${BrandFullName}.lnk" a
+    FileClose $0
+  ${EndIf}
+
   ${If} $AddDesktopSC == 1
     CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}"
     ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk"
       ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" \
                                              "$INSTDIR"
       ${If} ${AtLeastWin7}
       ${AndIf} "$AppUserModelID" != ""
         ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID"  "true"
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -115,16 +115,23 @@
       WriteRegStr HKLM "Software\mozilla.org\Mozilla" "CurrentVersion" "${GREVersion}"
     ${EndIf}
   ${EndIf}
 
   ; Migrate the application's Start Menu directory to a single shortcut in the
   ; root of the Start Menu Programs directory.
   ${MigrateStartMenuShortcut}
 
+  ; Update lastwritetime of the Start Menu shortcut to clear the tile cache.
+  ${If} ${AtLeastWin8}
+  ${AndIf} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk"
+    FileOpen $0 "$SMPROGRAMS\${BrandFullName}.lnk" a
+    FileClose $0
+  ${EndIf}
+
   ; Adds a pinned Task Bar shortcut (see MigrateTaskBarShortcut for details).
   ${MigrateTaskBarShortcut}
 
   ${RemoveDeprecatedKeys}
 
   ${SetAppKeys}
   ${FixClassKeys}
   ${SetUninstallKeys}