Bug 1845330 - Port bug 1843702: Remove dead code from installer. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D184489 --HG-- extra : rebase_source : ff2e22186b603252ffadde2782b8d1bbc21f3242
This commit is contained in:
Родитель
25b14f441d
Коммит
11a8d30d69
|
@ -31,7 +31,6 @@ Var TmpVal
|
|||
Var InstallType
|
||||
Var AddStartMenuSC
|
||||
Var AddTaskbarSC
|
||||
Var AddQuickLaunchSC
|
||||
Var AddDesktopSC
|
||||
Var InstallMaintenanceService
|
||||
Var InstallOptionalExtensions
|
||||
|
@ -376,16 +375,6 @@ Section "-Application" APP_IDX
|
|||
StrCpy $AddStartMenuSC "1"
|
||||
${EndIf}
|
||||
|
||||
; Default for creating Quick Launch shortcut (1 = create, 0 = don't create)
|
||||
${If} $AddQuickLaunchSC == ""
|
||||
; Don't install the quick launch shortcut on Windows 7
|
||||
${If} ${AtLeastWin7}
|
||||
StrCpy $AddQuickLaunchSC "0"
|
||||
${Else}
|
||||
StrCpy $AddQuickLaunchSC "1"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; Default for creating Desktop shortcut (1 = create, 0 = don't create)
|
||||
${If} $AddDesktopSC == ""
|
||||
StrCpy $AddDesktopSC "1"
|
||||
|
@ -458,14 +447,13 @@ Section "-Application" APP_IDX
|
|||
${AddHandlerValues} "$0\ThunderbirdICS" "$1" "$8,0" \
|
||||
"${AppRegNameCalendar} Document" "" ""
|
||||
|
||||
; For pre win8, the following keys should only be set if we can write to HKLM.
|
||||
; For post win8, the keys below can be set in HKCU if needed.
|
||||
; The keys below can be set in HKCU if needed.
|
||||
${If} $TmpVal == "HKLM"
|
||||
; Set the Start Menu Mail/News and Registered App HKLM registry keys.
|
||||
${SetClientsMail} "HKLM"
|
||||
${SetClientsNews} "HKLM"
|
||||
${SetClientsCalendar} "HKLM"
|
||||
${ElseIf} ${AtLeastWin8}
|
||||
${Else}
|
||||
; Set the Start Menu Mail/News and Registered App HKCU registry keys.
|
||||
${SetClientsMail} "HKCU"
|
||||
${SetClientsNews} "HKCU"
|
||||
|
@ -568,16 +556,14 @@ Section "-Application" APP_IDX
|
|||
; Update lastwritetime of the Start Menu shortcut to clear the tile cache.
|
||||
; Do this for both shell contexts in case the user has shortcuts in multiple
|
||||
; locations, then restore the previous context at the end.
|
||||
${If} ${AtLeastWin8}
|
||||
SetShellVarContext all
|
||||
${TouchStartMenuShortcut}
|
||||
SetShellVarContext current
|
||||
${TouchStartMenuShortcut}
|
||||
${If} $TmpVal == "HKLM"
|
||||
SetShellVarContext all
|
||||
${TouchStartMenuShortcut}
|
||||
${ElseIf} $TmpVal == "HKCU"
|
||||
SetShellVarContext current
|
||||
${TouchStartMenuShortcut}
|
||||
${If} $TmpVal == "HKLM"
|
||||
SetShellVarContext all
|
||||
${ElseIf} $TmpVal == "HKCU"
|
||||
SetShellVarContext current
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} $AddDesktopSC == 1
|
||||
|
@ -595,27 +581,6 @@ Section "-Application" APP_IDX
|
|||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; If elevated the Quick Launch shortcut must be added from the unelevated
|
||||
; original process.
|
||||
${If} $AddQuickLaunchSC == 1
|
||||
${Unless} ${AtLeastWin7}
|
||||
ClearErrors
|
||||
${GetParameters} $0
|
||||
${GetOptions} "$0" "/UAC:" $0
|
||||
${If} ${Errors}
|
||||
Call AddQuickLaunchShortcut
|
||||
${LogMsg} "Added Shortcut: $QUICKLAUNCH\${BrandShortName}.lnk"
|
||||
${Else}
|
||||
; It is not possible to add a log entry from the unelevated process so
|
||||
; add the log entry without the path since there is no simple way to
|
||||
; know the correct full path.
|
||||
${LogMsg} "Added Quick Launch Shortcut: ${BrandShortName}.lnk"
|
||||
GetFunctionAddress $0 AddQuickLaunchShortcut
|
||||
UAC::ExecCodeSegment $0
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
|
||||
!ifdef MOZ_MAINTENANCE_SERVICE
|
||||
${If} $TmpVal == "HKLM"
|
||||
; Add the registry keys for allowed certificates.
|
||||
|
@ -770,14 +735,6 @@ FunctionEnd
|
|||
################################################################################
|
||||
# Helper Functions
|
||||
|
||||
Function AddQuickLaunchShortcut
|
||||
CreateShortCut "$QUICKLAUNCH\${BrandShortName}.lnk" "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${FileExists} "$QUICKLAUNCH\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandShortName}.lnk" \
|
||||
"$INSTDIR"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function CheckExistingInstall
|
||||
; If there is a pending file copy from a previous upgrade don't allow
|
||||
; installing until after the system has rebooted.
|
||||
|
@ -1045,51 +1002,14 @@ Function preSummary
|
|||
DeleteINIStr "$PLUGINSDIR\summary.ini" "Settings" NextButtonText
|
||||
${EndIf}
|
||||
|
||||
; Remove the "Field 4" ini section in case the user hits back and changes the
|
||||
; installation directory which could change whether the make default checkbox
|
||||
; should be displayed.
|
||||
DeleteINISec "$PLUGINSDIR\summary.ini" "Field 4"
|
||||
|
||||
; Check if it is possible to write to HKLM
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Thunderbird" "${BrandShortName}InstallerTest" "Write Test"
|
||||
${Unless} ${Errors}
|
||||
DeleteRegValue HKLM "Software\Thunderbird" "${BrandShortName}InstallerTest"
|
||||
; Check if Firefox is already the handler for http. This is set on all
|
||||
; versions of Windows.
|
||||
${IsHandlerForInstallDir} "http" $R9
|
||||
${If} "$R9" != "true"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "4"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Type "checkbox"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Text "$(SUMMARY_TAKE_DEFAULTS)"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Left "0"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Right "-1"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" State "1"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "32"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "53"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
|
||||
${If} "$TmpVal" == "true"
|
||||
; If there is already a Type entry in the "Field 4" section with a value of
|
||||
; checkbox then the set as the default mail client checkbox is displayed and
|
||||
; this text must be moved below it.
|
||||
ReadINIStr $0 "$PLUGINSDIR\summary.ini" "Field 4" "Type"
|
||||
${If} "$0" == "checkbox"
|
||||
StrCpy $0 "5"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "53"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "68"
|
||||
${Else}
|
||||
StrCpy $0 "4"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "35"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "50"
|
||||
${EndIf}
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "$0"
|
||||
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Type "label"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Text "$(SUMMARY_REBOOT_REQUIRED_INSTALL)"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Left "0"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Right "-1"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "4"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Type "label"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Text "$(SUMMARY_REBOOT_REQUIRED_INSTALL)"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Left "0"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Right "-1"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "35"
|
||||
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "50"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "$(SUMMARY_PAGE_TITLE)" "$(SUMMARY_PAGE_SUBTITLE)"
|
||||
|
|
|
@ -118,7 +118,7 @@ Function .onInit
|
|||
|
||||
SetSilent silent
|
||||
|
||||
${Unless} ${AtLeastWin7}
|
||||
${Unless} ${AtLeastWin10}
|
||||
Abort
|
||||
${EndUnless}
|
||||
FunctionEnd
|
||||
|
|
|
@ -75,33 +75,17 @@
|
|||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; Adds a pinned Task Bar shortcut (see MigrateTaskBarShortcut for details).
|
||||
; When we enabled this feature for Windows 10 & 11 we decided _not_ to pin
|
||||
; during an update (even once) because we already offered to do when the
|
||||
; the user originally installed, and we don't want to go against their
|
||||
; explicit wishes.
|
||||
; For Windows 7 and 8, we've been doing this ~forever, and those users may
|
||||
; not have experienced the onboarding offer to pin to taskbar, so we're
|
||||
; leaving it enabled there.
|
||||
${If} ${AtMostWin2012R2}
|
||||
${MigrateTaskBarShortcut} "$AddTaskbarSC"
|
||||
${EndIf}
|
||||
|
||||
; Update the name/icon/AppModelID of our shortcuts as needed, then update the
|
||||
; lastwritetime of the Start Menu shortcut to clear the tile icon cache.
|
||||
; Do this for both shell contexts in case the user has shortcuts in multiple
|
||||
; locations, then restore the previous context at the end.
|
||||
SetShellVarContext all
|
||||
${UpdateShortcutsBranding}
|
||||
${If} ${AtLeastWin8}
|
||||
${TouchStartMenuShortcut}
|
||||
${EndIf}
|
||||
${TouchStartMenuShortcut}
|
||||
Call FixShortcutAppModelIDs
|
||||
SetShellVarContext current
|
||||
${UpdateShortcutsBranding}
|
||||
${If} ${AtLeastWin8}
|
||||
${TouchStartMenuShortcut}
|
||||
${EndIf}
|
||||
${TouchStartMenuShortcut}
|
||||
Call FixShortcutAppModelIDs
|
||||
${If} $TmpVal == "HKLM"
|
||||
SetShellVarContext all
|
||||
|
@ -212,9 +196,7 @@
|
|||
!macro HideShortcuts
|
||||
StrCpy $R1 "Software\Clients\Mail\${ClientsRegName}\InstallInfo"
|
||||
WriteRegDWORD HKLM "$R1" "IconsVisible" 0
|
||||
${If} ${AtLeastWin8}
|
||||
WriteRegDWORD HKCU "$R1" "IconsVisible" 0
|
||||
${EndIf}
|
||||
WriteRegDWORD HKCU "$R1" "IconsVisible" 0
|
||||
|
||||
SetShellVarContext all ; Set $DESKTOP to All Users
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandShortName}.lnk"
|
||||
|
@ -273,17 +255,14 @@
|
|||
!macro ShowShortcuts
|
||||
StrCpy $R1 "Software\Clients\Mail\${ClientsRegName}\InstallInfo"
|
||||
WriteRegDWORD HKLM "$R1" "IconsVisible" 1
|
||||
${If} ${AtLeastWin8}
|
||||
WriteRegDWORD HKCU "$R1" "IconsVisible" 1
|
||||
${EndIf}
|
||||
WriteRegDWORD HKCU "$R1" "IconsVisible" 1
|
||||
|
||||
SetShellVarContext all ; Set $DESKTOP to All Users
|
||||
${Unless} ${FileExists} "$DESKTOP\${BrandShortName}.lnk"
|
||||
CreateShortCut "$DESKTOP\${BrandShortName}.lnk" "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${FileExists} "$DESKTOP\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandShortName}.lnk" "$INSTDIR"
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$DESKTOP\${BrandShortName}.lnk" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
${Else}
|
||||
|
@ -293,8 +272,7 @@
|
|||
${If} ${FileExists} "$DESKTOP\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandShortName}.lnk" \
|
||||
"$INSTDIR"
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$DESKTOP\${BrandShortName}.lnk" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
@ -308,8 +286,7 @@
|
|||
${If} ${FileExists} "$SMPROGRAMS\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandShortName}.lnk" \
|
||||
"$INSTDIR"
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$SMPROGRAMS\${BrandShortName}.lnk" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
${Else}
|
||||
|
@ -320,25 +297,13 @@
|
|||
${If} ${FileExists} "$SMPROGRAMS\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandShortName}.lnk" \
|
||||
"$INSTDIR"
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$SMPROGRAMS\${BrandShortName}.lnk" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
|
||||
; Windows 7 doesn't use the QuickLaunch directory
|
||||
${Unless} ${AtLeastWin7}
|
||||
${AndUnless} ${FileExists} "$QUICKLAUNCH\${BrandShortName}.lnk"
|
||||
CreateShortCut "$QUICKLAUNCH\${BrandShortName}.lnk" \
|
||||
"$INSTDIR\${FileMainEXE}"
|
||||
${If} ${FileExists} "$QUICKLAUNCH\${BrandShortName}.lnk"
|
||||
ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandShortName}.lnk" \
|
||||
"$INSTDIR"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
!macroend
|
||||
!define ShowShortcuts "!insertmacro ShowShortcuts"
|
||||
|
||||
|
@ -1022,10 +987,8 @@
|
|||
WriteRegDWORD HKCU \
|
||||
"Software\Mozilla\${AppName}\Installer\$AppUserModelID" \
|
||||
"WasPinnedToTaskbar" 1
|
||||
${If} ${AtLeastWin7}
|
||||
${If} "${SHOULD_PIN}" == "1"
|
||||
${PinToTaskBar}
|
||||
${EndIf}
|
||||
${If} "${SHOULD_PIN}" == "1"
|
||||
${PinToTaskBar}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
@ -1040,90 +1003,84 @@
|
|||
; model ID removes a pinned pinned Start Menu shortcut this will also add a
|
||||
; pinned Start Menu shortcut.
|
||||
!macro PinToTaskBar
|
||||
${If} ${AtLeastWin7}
|
||||
StrCpy $8 "false" ; Whether a shortcut had to be created
|
||||
${IsPinnedToTaskBar} "$INSTDIR\${FileMainEXE}" $R9
|
||||
${If} "$R9" == "false"
|
||||
; Find an existing Start Menu shortcut or create one to use for pinning
|
||||
${GetShortcutsLogPath} $0
|
||||
${If} ${FileExists} "$0"
|
||||
ClearErrors
|
||||
ReadINIStr $1 "$0" "STARTMENU" "Shortcut0"
|
||||
${Unless} ${Errors}
|
||||
SetShellVarContext all ; Set SHCTX to all users
|
||||
${Unless} ${FileExists} "$SMPROGRAMS\$1"
|
||||
SetShellVarContext current ; Set SHCTX to the current user
|
||||
StrCpy $8 "false" ; Whether a shortcut had to be created
|
||||
${IsPinnedToTaskBar} "$INSTDIR\${FileMainEXE}" $R9
|
||||
${If} "$R9" == "false"
|
||||
; Find an existing Start Menu shortcut or create one to use for pinning
|
||||
${GetShortcutsLogPath} $0
|
||||
${If} ${FileExists} "$0"
|
||||
ClearErrors
|
||||
ReadINIStr $1 "$0" "STARTMENU" "Shortcut0"
|
||||
${Unless} ${Errors}
|
||||
SetShellVarContext all ; Set SHCTX to all users
|
||||
${Unless} ${FileExists} "$SMPROGRAMS\$1"
|
||||
SetShellVarContext current ; Set SHCTX to the current user
|
||||
${Unless} ${FileExists} "$SMPROGRAMS\$1"
|
||||
StrCpy $8 "true"
|
||||
CreateShortCut "$SMPROGRAMS\$1" "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${FileExists} "$SMPROGRAMS\$1"
|
||||
ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\$1" \
|
||||
"$INSTDIR"
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$SMPROGRAMS\$1" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
StrCpy $8 "true"
|
||||
CreateShortCut "$SMPROGRAMS\$1" "$INSTDIR\${FileMainEXE}"
|
||||
${If} ${FileExists} "$SMPROGRAMS\$1"
|
||||
ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\$1" \
|
||||
"$INSTDIR"
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::Set "$SMPROGRAMS\$1" "$AppUserModelID" "true"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndUnless}
|
||||
|
||||
${If} ${FileExists} "$SMPROGRAMS\$1"
|
||||
; Count of Start Menu pinned shortcuts before unpinning.
|
||||
${PinnedToStartMenuLnkCount} $R9
|
||||
|
||||
; Having multiple shortcuts pointing to different installations with
|
||||
; the same AppUserModelID (e.g. side by side installations of the
|
||||
; same version) will make the TaskBar shortcut's lists into an bad
|
||||
; state where the lists are not shown. To prevent this first
|
||||
; uninstall the pinned item.
|
||||
ApplicationID::UninstallPinnedItem "$SMPROGRAMS\$1"
|
||||
|
||||
; Count of Start Menu pinned shortcuts after unpinning.
|
||||
${PinnedToStartMenuLnkCount} $R8
|
||||
|
||||
; If there is a change in the number of Start Menu pinned shortcuts
|
||||
; assume that unpinning unpinned a side by side installation from
|
||||
; the Start Menu and pin this installation to the Start Menu.
|
||||
${Unless} $R8 == $R9
|
||||
; Pin the shortcut to the Start Menu. 5381 is the shell32.dll
|
||||
; resource id for the "Pin to Start Menu" string.
|
||||
InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5381"
|
||||
${EndUnless}
|
||||
|
||||
${If} ${FileExists} "$SMPROGRAMS\$1"
|
||||
; Count of Start Menu pinned shortcuts before unpinning.
|
||||
${PinnedToStartMenuLnkCount} $R9
|
||||
|
||||
; Having multiple shortcuts pointing to different installations with
|
||||
; the same AppUserModelID (e.g. side by side installations of the
|
||||
; same version) will make the TaskBar shortcut's lists into an bad
|
||||
; state where the lists are not shown. To prevent this first
|
||||
; uninstall the pinned item.
|
||||
ApplicationID::UninstallPinnedItem "$SMPROGRAMS\$1"
|
||||
|
||||
; Count of Start Menu pinned shortcuts after unpinning.
|
||||
${PinnedToStartMenuLnkCount} $R8
|
||||
|
||||
; If there is a change in the number of Start Menu pinned shortcuts
|
||||
; assume that unpinning unpinned a side by side installation from
|
||||
; the Start Menu and pin this installation to the Start Menu.
|
||||
${Unless} $R8 == $R9
|
||||
; Pin the shortcut to the Start Menu. 5381 is the shell32.dll
|
||||
; resource id for the "Pin to Start Menu" string.
|
||||
InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5381"
|
||||
${EndUnless}
|
||||
|
||||
${If} ${AtMostWin2012R2}
|
||||
; Pin the shortcut to the TaskBar. 5386 is the shell32.dll
|
||||
; resource id for the "Pin to Taskbar" string.
|
||||
InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "5386"
|
||||
${ElseIf} ${AtMostWaaS} 1809
|
||||
; In Windows 10 the "Pin to Taskbar" resource was removed, so we
|
||||
; can't access the verb that way anymore. We have a create a
|
||||
; command key using the GUID that's assigned to this action and
|
||||
; then invoke that as a verb. This works up until build 1809.
|
||||
ReadRegStr $R9 HKLM \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.taskbarpin" \
|
||||
"ExplorerCommandHandler"
|
||||
WriteRegStr HKCU "Software\Classes\*\shell\${AppRegNameMail}-$AppUserModelID" "ExplorerCommandHandler" $R9
|
||||
InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "${AppRegNameMail}-$AppUserModelID"
|
||||
DeleteRegKey HKCU "Software\Classes\*\shell\${AppRegNameMail}-$AppUserModelID"
|
||||
${Else}
|
||||
; In the Windows 10 1903 and up (and Windows 11) the above no
|
||||
; longer works. We have yet another method for these versions
|
||||
; which is detailed in the PinToTaskbar plugin code.
|
||||
PinToTaskbar::Pin "$SMPROGRAMS\$1"
|
||||
${EndIf}
|
||||
|
||||
; Delete the shortcut if it was created
|
||||
${If} "$8" == "true"
|
||||
Delete "$SMPROGRAMS\$1"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} $TmpVal == "HKCU"
|
||||
SetShellVarContext current ; Set SHCTX to the current user
|
||||
${If} ${AtMostWaaS} 1809
|
||||
; In Windows 10 the "Pin to Taskbar" resource was removed, so we
|
||||
; can't access the verb that way anymore. We have to create a
|
||||
; command key using the GUID that's assigned to this action and
|
||||
; then invoke that as a verb. This works up until build 1809
|
||||
ReadRegStr $R9 HKLM \
|
||||
"Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.taskbarpin" \
|
||||
"ExplorerCommandHandler"
|
||||
WriteRegStr HKCU "Software\Classes\*\shell\${AppRegNameMail}-$AppUserModelID" "ExplorerCommandHandler" $R9
|
||||
InvokeShellVerb::DoIt "$SMPROGRAMS" "$1" "${AppRegNameMail}-$AppUserModelID"
|
||||
DeleteRegKey HKCU "Software\Classes\*\shell\${AppRegNameMail}-$AppUserModelID"
|
||||
${Else}
|
||||
SetShellVarContext all ; Set SHCTX to all users
|
||||
; In the Windows 10 1903 and up (and Windows 11) the above no
|
||||
; longer works. We have yet another method for these versions
|
||||
; which is detailed in the PinToTaskbar plugin code.
|
||||
PinToTaskbar::Pin "$SMPROGRAMS\$1"
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
|
||||
; Delete the shortcut if it was created
|
||||
${If} "$8" == "true"
|
||||
Delete "$SMPROGRAMS\$1"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} $TmpVal == "HKCU"
|
||||
SetShellVarContext current ; Set SHCTX to the current user
|
||||
${Else}
|
||||
SetShellVarContext all ; Set SHCTX to all users
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
@ -1253,8 +1210,7 @@
|
|||
|
||||
; Helper for updating the shortcut application model IDs.
|
||||
Function FixShortcutAppModelIDs
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
${If} "$AppUserModelID" != ""
|
||||
${UpdateShortcutAppModelIDs} "$INSTDIR\${FileMainEXE}" "$AppUserModelID" $0
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
@ -1427,9 +1383,7 @@ Function SetAsDefaultMailAppUserHKCU
|
|||
|
||||
SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU)
|
||||
|
||||
${If} ${AtLeastWin8}
|
||||
${SetHandlersMail}
|
||||
${EndIf}
|
||||
${SetHandlersMail}
|
||||
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegNameMail}"
|
||||
|
@ -1467,9 +1421,7 @@ Function SetAsDefaultNewsAppUserHKCU
|
|||
|
||||
SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU)
|
||||
|
||||
${If} ${AtLeastWin8}
|
||||
${SetHandlersNews}
|
||||
${EndIf}
|
||||
${SetHandlersNews}
|
||||
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegNameNews}"
|
||||
|
@ -1503,9 +1455,7 @@ Function SetAsDefaultCalendarAppUserHKCU
|
|||
|
||||
SetShellVarContext current ; Set SHCTX to the current user (e.g. HKCU)
|
||||
|
||||
${If} ${AtLeastWin8}
|
||||
${SetHandlersCalendar}
|
||||
${EndIf}
|
||||
${SetHandlersCalendar}
|
||||
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegNameCalendar}"
|
||||
|
|
|
@ -277,9 +277,8 @@ Section "Uninstall"
|
|||
${un.RegCleanUninstall}
|
||||
${un.DeleteShortcuts}
|
||||
|
||||
; Unregister resources associated with Win7 taskbar jump lists.
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} "$AppUserModelID" != ""
|
||||
; Unregister resources associated with taskbar jump lists.
|
||||
${If} "$AppUserModelID" != ""
|
||||
ApplicationID::UninstallJumpLists "$AppUserModelID"
|
||||
${EndIf}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ SUMMARY_PAGE_SUBTITLE=Ready to start installing $BrandShortName
|
|||
SUMMARY_INSTALLED_TO=$BrandShortName will be installed to the following location:
|
||||
SUMMARY_REBOOT_REQUIRED_INSTALL=A restart of your computer may be required to complete the installation.
|
||||
SUMMARY_REBOOT_REQUIRED_UNINSTALL=A restart of your computer may be required to complete the uninstall.
|
||||
SUMMARY_TAKE_DEFAULTS=U&se $BrandShortName as my default mail application
|
||||
SUMMARY_INSTALL_CLICK=Click Install to continue.
|
||||
SUMMARY_UPGRADE_CLICK=Click Upgrade to continue.
|
||||
SURVEY_TEXT=&Tell us what you thought of $BrandShortName
|
||||
|
@ -80,6 +79,4 @@ OPTION_CUSTOM_RADIO=&Custom
|
|||
|
||||
# LOCALIZATION NOTE:
|
||||
# The following text replaces the Install button text on the summary page.
|
||||
# Verify that the access key for InstallBtn (in override.properties) and
|
||||
# UPGRADE_BUTTON is not already used by SUMMARY_TAKE_DEFAULTS.
|
||||
UPGRADE_BUTTON=&Upgrade
|
||||
|
|
Загрузка…
Ссылка в новой задаче