Bug 1334883 - Remove code Windows Vista code from installer. r?mhowell draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 29 Jan 2017 20:09:08 +0100
changeset 467782 6d9b74b2945b192923ce5ef8e5da8a30c66d652f
parent 467781 ac8a9c7115b89e5661f454183a283257bc76adaf
child 467783 4b34eaa806625c3b8e1d22551f215a331da07708
push id43273
push userarchaeopteryx@coole-files.de
push dateSun, 29 Jan 2017 19:46:13 +0000
reviewersmhowell
bugs1334883
milestone54.0a1
Bug 1334883 - Remove code Windows Vista code from installer. r?mhowell MozReview-Commit-ID: DgPm4Msbl0W
browser/installer/windows/nsis/installer.nsi
browser/installer/windows/nsis/shared.nsh
browser/installer/windows/nsis/stub.nsi
browser/installer/windows/nsis/uninstaller.nsi
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -41,17 +41,17 @@ Var InstallMaintenanceService
 Var PageName
 Var PreventRebootRequired
 
 ; By defining NO_STARTMENU_DIR an installer that doesn't provide an option for
 ; an application's Start Menu PROGRAMS directory and doesn't define the
 ; StartMenuDir variable can use the common InstallOnInitCommon macro.
 !define NO_STARTMENU_DIR
 
-; On Vista and above attempt to elevate Standard Users in addition to users that
+; Attempt to elevate Standard Users in addition to users that
 ; are a member of the Administrators group.
 !define NONADMIN_ELEVATE
 
 !define AbortSurveyURL "http://www.kampyle.com/feedback_form/ff-feedback-form.php?site_code=8166124&form_id=12116&url="
 
 ; Other included files may depend upon these includes!
 ; The following includes are provided by NSIS.
 !include FileFunc.nsh
@@ -247,17 +247,17 @@ Section "-InstallStartCleanup"
     Sleep 5000
     ${DeleteFile} "$INSTDIR\${FileMainEXE}"
     ClearErrors
   ${EndIf}
 
   ; setup the application model id registration value
   ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
 
-  ; Remove the updates directory for Vista and above
+  ; Remove the updates directory
   ${CleanUpdateDirectories} "Mozilla\Firefox" "Mozilla\updates"
 
   ${RemoveDeprecatedFiles}
   ${RemovePrecompleteEntries} "false"
 
   ${If} ${FileExists} "$INSTDIR\defaults\pref\channel-prefs.js"
     Delete "$INSTDIR\defaults\pref\channel-prefs.js"
   ${EndIf}
@@ -385,17 +385,17 @@ Section "-Application" APP_IDX
   ${AddDisabledDDEHandlerValues} "FirefoxHTML" "$2" "$8,1" \
                                  "${AppRegName} Document" ""
   ${AddDisabledDDEHandlerValues} "FirefoxURL" "$2" "$8,1" "${AppRegName} URL" \
                                  "true"
 
   ; For pre win8, the following keys should only be set if we can write to HKLM.
   ; For post win8, the keys below get set in both HKLM and HKCU.
   ${If} $TmpVal == "HKLM"
-    ; Set the Start Menu Internet and Vista Registered App HKLM registry keys.
+    ; Set the Start Menu Internet and Registered App HKLM registry keys.
     ${SetStartMenuInternet} "HKLM"
     ${FixShellIconHandler} "HKLM"
 
     ; If we are writing to HKLM and create either the desktop or start menu
     ; shortcuts set IconsVisible to 1 otherwise to 0.
     ; Taskbar shortcuts imply having a start menu shortcut.
     ${StrFilter} "${FileMainEXE}" "+" "" "" $R9
     StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo"
@@ -404,17 +404,17 @@ Section "-Application" APP_IDX
     ${OrIf} $AddTaskbarSC == 1
       WriteRegDWORD HKLM "$0" "IconsVisible" 1
     ${Else}
       WriteRegDWORD HKLM "$0" "IconsVisible" 0
     ${EndIf}
   ${EndIf}
 
   ${If} ${AtLeastWin8}
-    ; Set the Start Menu Internet and Vista Registered App HKCU registry keys.
+    ; Set the Start Menu Internet and Registered App HKCU registry keys.
     ${SetStartMenuInternet} "HKCU"
     ${FixShellIconHandler} "HKCU"
 
     ; If we create either the desktop or start menu shortcuts, then
     ; set IconsVisible to 1 otherwise to 0.
     ; Taskbar shortcuts imply having a start menu shortcut.
     ${StrFilter} "${FileMainEXE}" "+" "" "" $R9
     StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo"
@@ -463,17 +463,17 @@ Section "-Application" APP_IDX
   ${WriteRegStr2} $TmpVal "$0" "Path" "$INSTDIR" 0
 
   StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9"
   ${CreateRegKey} "$TmpVal" "$0" 0
   StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe"
   ${CreateRegKey} "$TmpVal" "$0" 0
 
   ${If} $TmpVal == "HKLM"
-    ; Set the permitted LSP Categories for WinVista and above
+    ; Set the permitted LSP Categories
     ${SetAppLSPCategories} ${LSP_CATEGORIES}
   ${EndIf}
 
   ; Create shortcuts
   ${LogHeader} "Adding Shortcuts"
 
   ; Remove the start menu shortcuts and directory if the SMPROGRAMS section
   ; exists in the shortcuts_log.ini and the SMPROGRAMS. The installer's shortcut
@@ -590,25 +590,23 @@ Section "-InstallEndCleanup"
   ${Unless} ${Silent}
     ${MUI_INSTALLOPTIONS_READ} $0 "summary.ini" "Field 4" "State"
     ${If} "$0" == "1"
       ; NB: this code is duplicated in stub.nsi. Please keep in sync.
       ; For data migration in the app, we want to know what the default browser
       ; value was before we changed it. To do so, we read it here and store it
       ; in our own registry key.
       StrCpy $0 ""
-      ${If} ${AtLeastWinVista}
-        AppAssocReg::QueryCurrentDefault "http" "protocol" "effective"
-        Pop $1
-        ; If the method hasn't failed, $1 will contain the progid. Check:
-        ${If} "$1" != "method failed"
-        ${AndIf} "$1" != "method not available"
-          ; Read the actual command from the progid
-          ReadRegStr $0 HKCR "$1\shell\open\command" ""
-        ${EndIf}
+      AppAssocReg::QueryCurrentDefault "http" "protocol" "effective"
+      Pop $1
+      ; If the method hasn't failed, $1 will contain the progid. Check:
+      ${If} "$1" != "method failed"
+      ${AndIf} "$1" != "method not available"
+        ; Read the actual command from the progid
+        ReadRegStr $0 HKCR "$1\shell\open\command" ""
       ${EndIf}
       ; If using the App Association Registry didn't happen or failed, fall back
       ; to the effective http default:
       ${If} "$0" == ""
         ReadRegStr $0 HKCR "http\shell\open\command" ""
       ${EndIf}
       ; If we have something other than empty string now, write the value.
       ${If} "$0" != ""
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -437,34 +437,34 @@
   WriteRegStr ${RegKey} "$0\shell\open\command" "" "$\"$8$\""
 
   WriteRegStr ${RegKey} "$0\shell\properties" "" "$(CONTEXT_OPTIONS)"
   WriteRegStr ${RegKey} "$0\shell\properties\command" "" "$\"$8$\" -preferences"
 
   WriteRegStr ${RegKey} "$0\shell\safemode" "" "$(CONTEXT_SAFE_MODE)"
   WriteRegStr ${RegKey} "$0\shell\safemode\command" "" "$\"$8$\" -safe-mode"
 
-  ; Vista Capabilities registry keys
+  ; Capabilities registry keys
   WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationDescription" "$(REG_APP_DESC)"
   WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationIcon" "$8,0"
   WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationName" "${BrandShortName}"
 
   WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".htm"   "FirefoxHTML"
   WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".html"  "FirefoxHTML"
   WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".shtml" "FirefoxHTML"
   WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xht"   "FirefoxHTML"
   WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xhtml" "FirefoxHTML"
 
   WriteRegStr ${RegKey} "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9"
 
   WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "ftp"    "FirefoxURL"
   WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http"   "FirefoxURL"
   WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https"  "FirefoxURL"
 
-  ; Vista Registered Application
+  ; Registered Application
   WriteRegStr ${RegKey} "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities"
 !macroend
 !define SetStartMenuInternet "!insertmacro SetStartMenuInternet"
 
 ; The IconHandler reference for FirefoxHTML can end up in an inconsistent state
 ; due to changes not being detected by the IconHandler for side by side
 ; installs (see bug 268512). The symptoms can be either an incorrect icon or no
 ; icon being displayed for files associated with Firefox (does not use SHCTX).
@@ -1194,17 +1194,17 @@
   Push $R9
   Push $R8
   Push $R7
   Push $R6
   Push "false"
 
   System::Call 'advapi32::OpenSCManagerW(n, n, i ${SC_MANAGER_ALL_ACCESS}) i.R6'
   ${If} $R6 != 0
-    ; MpsSvc is the Firewall service on Windows Vista and above.
+    ; MpsSvc is the Firewall service.
     ; When opening the service with SERVICE_QUERY_CONFIG the return value will
     ; be 0 if the service is not installed.
     System::Call 'advapi32::OpenServiceW(i R6, t "MpsSvc", i ${SERVICE_QUERY_CONFIG}) i.R7'
     ${If} $R7 != 0
       System::Call 'advapi32::CloseServiceHandle(i R7) n'
       ; Open the service with SERVICE_QUERY_CONFIG so its status can be queried.
       System::Call 'advapi32::OpenServiceW(i R6, t "MpsSvc", i ${SERVICE_QUERY_STATUS}) i.R7'
     ${Else}
@@ -1245,17 +1245,17 @@
   Exch 1
   Pop $R9
 !macroend
 !define IsFirewallSvcRunning "!insertmacro IsFirewallSvcRunning"
 !define un.IsFirewallSvcRunning "!insertmacro IsFirewallSvcRunning"
 
 ; Sets this installation as the default browser by setting the registry keys
 ; under HKEY_CURRENT_USER via registry calls and using the AppAssocReg NSIS
-; plugin for Vista and above. This is a function instead of a macro so it is
+; plugin. This is a function instead of a macro so it is
 ; easily called from an elevated instance of the binary. Since this can be
 ; called by an elevated instance logging is not performed in this function.
 Function SetAsDefaultAppUserHKCU
   ; Only set as the user's StartMenuInternet browser if the StartMenuInternet
   ; registry keys are for this install.
   ${StrFilter} "${FileMainEXE}" "+" "" "" $R9
   ClearErrors
   ReadRegStr $0 HKCU "Software\Clients\StartMenuInternet\$R9\DefaultIcon" ""
@@ -1280,29 +1280,27 @@ Function SetAsDefaultAppUserHKCU
   ${If} ${AtLeastWin8}
     ${SetStartMenuInternet} "HKCU"
     ${FixShellIconHandler} "HKCU"
     ${FixClassKeys} ; Does not use SHCTX
   ${EndIf}
 
   ${SetHandlers}
 
-  ${If} ${AtLeastWinVista}
-    ; Only register as the handler on Vista and above if the app registry name
-    ; exists under the RegisteredApplications registry key. The protocol and
-    ; file handlers set previously at the user level will associate this install
-    ; as the default browser.
-    ClearErrors
-    ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}"
-    ${Unless} ${Errors}
-      ; This is all protected by a user choice hash in Windows 8 so it won't
-      ; help, but it also won't hurt.
-      AppAssocReg::SetAppAsDefaultAll "${AppRegName}"
-    ${EndUnless}
-  ${EndIf}
+  ; Only register as the handler if the app registry name
+  ; exists under the RegisteredApplications registry key. The protocol and
+  ; file handlers set previously at the user level will associate this install
+  ; as the default browser.
+  ClearErrors
+  ReadRegStr $0 HKLM "Software\RegisteredApplications" "${AppRegName}"
+  ${Unless} ${Errors}
+    ; This is all protected by a user choice hash in Windows 8 so it won't
+    ; help, but it also won't hurt.
+    AppAssocReg::SetAppAsDefaultAll "${AppRegName}"
+  ${EndUnless}
   ${RemoveDeprecatedKeys}
   ${MigrateTaskBarShortcut}
 FunctionEnd
 
 ; Helper for updating the shortcut application model IDs.
 Function FixShortcutAppModelIDs
   ${If} ${AtLeastWin7}
   ${AndIf} "$AppUserModelID" != ""
@@ -1374,18 +1372,17 @@ Function SetAsDefaultAppUser
           GetFunctionAddress $0 SetAsDefaultAppUserHKCU
           UAC::ExecCodeSegment $0
         ${EndIf}
         Return ; Nothing more needs to be done
       ${EndIf}
     ${EndIf}
   ${EndUnless}
 
-  ; The code after ElevateUAC won't be executed on Vista and above when the
-  ; user:
+  ; The code after ElevateUAC won't be executed when the user:
   ; a) is a member of the administrators group (e.g. elevation is required)
   ; b) is not a member of the administrators group and chooses to elevate
   ${ElevateUAC}
 
   ${SetStartMenuInternet} "HKLM"
 
   SetShellVarContext all  ; Set SHCTX to all users (e.g. HKLM)
 
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -194,17 +194,17 @@ Var ControlRightPX
 ; as defined by InstallProgressFirstStep.
 !define /math InstallCleanTotalSteps ${InstallProgressFirstStep} + 1500
 
 ; Approximately 165 seconds (minus 0.2 seconds for each file that is removed)
 ; with a 100 millisecond timer and a first step of 20 as defined by
 ; InstallProgressFirstStep .
 !define /math InstallPaveOverTotalSteps ${InstallProgressFirstStep} + 1800
 
-; On Vista and above attempt to elevate Standard Users in addition to users that
+; Attempt to elevate Standard Users in addition to users that
 ; are a member of the Administrators group.
 !define NONADMIN_ELEVATE
 
 !define CONFIG_INI "config.ini"
 
 !ifndef FILE_SHARE_READ
   !define FILE_SHARE_READ 1
 !endif
@@ -432,21 +432,17 @@ Function .onInit
     StrCpy $CanSetAsDefault "false"
     StrCpy $CheckboxSetAsDefault "0"
   ${Else}
     DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
     StrCpy $CanSetAsDefault "true"
   ${EndIf}
 
   ; The interval in MS used for the progress bars set as marquee.
-  ${If} ${AtLeastWinVista}
-    StrCpy $ProgressbarMarqueeIntervalMS "10"
-  ${Else}
-    StrCpy $ProgressbarMarqueeIntervalMS "50"
-  ${EndIf}
+  StrCpy $ProgressbarMarqueeIntervalMS "50"
 
   ; Initialize the majority of variables except those that need to be reset
   ; when a page is displayed.
   StrCpy $IntroPhaseSeconds "0"
   StrCpy $OptionsPhaseSeconds "0"
   StrCpy $EndPreInstallPhaseTickCount "0"
   StrCpy $EndInstallPhaseTickCount "0"
   StrCpy $InitialInstallRequirementsCode ""
@@ -680,19 +676,18 @@ Function SendPing
           StrCpy $R2 "0"
         ${EndIf}
       ${EndIf}
     ${Else}
       StrCpy $R2 "0" ; Firefox is not set as default.
     ${EndIf}
 
     ${If} "$R2" == "0"
-    ${AndIf} ${AtLeastWinVista}
       ; Check to see if this install location is currently set as the default
-      ; browser by Default Programs which is only available on Vista and above.
+      ; browser by Default Programs.
       ClearErrors
       ReadRegStr $R3 HKLM "Software\RegisteredApplications" "${AppRegName}"
       ${Unless} ${Errors}
         AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
         Pop $R3
         ${If} $R3 == "1"
           StrCpy $R3 ""
           ReadRegStr $R2 HKLM "Software\Classes\http\shell\open\command" ""
@@ -1782,25 +1777,23 @@ Function FinishInstall
   Call SetProgressBars
 
   ${If} "$CheckboxSetAsDefault" == "1"
     ; NB: this code is duplicated in installer.nsi. Please keep in sync.
     ; For data migration in the app, we want to know what the default browser
     ; value was before we changed it. To do so, we read it here and store it
     ; in our own registry key.
     StrCpy $0 ""
-    ${If} ${AtLeastWinVista}
-      AppAssocReg::QueryCurrentDefault "http" "protocol" "effective"
-      Pop $1
-      ; If the method hasn't failed, $1 will contain the progid. Check:
-      ${If} "$1" != "method failed"
-      ${AndIf} "$1" != "method not available"
-        ; Read the actual command from the progid
-        ReadRegStr $0 HKCR "$1\shell\open\command" ""
-      ${EndIf}
+    AppAssocReg::QueryCurrentDefault "http" "protocol" "effective"
+    Pop $1
+    ; If the method hasn't failed, $1 will contain the progid. Check:
+    ${If} "$1" != "method failed"
+    ${AndIf} "$1" != "method not available"
+      ; Read the actual command from the progid
+      ReadRegStr $0 HKCR "$1\shell\open\command" ""
     ${EndIf}
     ; If using the App Association Registry didn't happen or failed, fall back
     ; to the effective http default:
     ${If} "$0" == ""
       ReadRegStr $0 HKCR "http\shell\open\command" ""
     ${EndIf}
     ; If we have something other than empty string now, write the value.
     ${If} "$0" != ""
@@ -1814,31 +1807,16 @@ Function FinishInstall
     ${If} ${Errors} ; Not elevated
       Call ExecSetAsDefaultAppUser
     ${Else} ; Elevated - execute the function in the unelevated process
       GetFunctionAddress $0 ExecSetAsDefaultAppUser
       UAC::ExecCodeSegment $0
     ${EndIf}
   ${EndIf}
 
-  ${If} $CheckboxShortcuts == 1
-    ${If} ${AtMostWinVista}
-      ClearErrors
-      ${GetParameters} $0
-      ClearErrors
-      ${GetOptions} "$0" "/UAC:" $0
-      ${If} ${Errors}
-        Call AddQuickLaunchShortcut
-      ${Else}
-        GetFunctionAddress $0 AddQuickLaunchShortcut
-        UAC::ExecCodeSegment $0
-      ${EndIf}
-    ${EndIf}
-  ${EndIf}
-
   ${If} ${FileExists} "$INSTDIR\${FileMainEXE}.moz-upgrade"
     Delete "$INSTDIR\${FileMainEXE}"
     Rename "$INSTDIR\${FileMainEXE}.moz-upgrade" "$INSTDIR\${FileMainEXE}"
   ${EndIf}
 
   StrCpy $ExitCode "${ERR_SUCCESS}"
 
   StrCpy $InstallCounterStep 0
@@ -2053,24 +2031,16 @@ Function CanWrite
     ${If} ${FileExists} "$3"
       Delete "$3"
       StrCpy $CanWriteToInstallDir "true"
     ${EndIf}
     RmDir "$2"
   ${EndIf}
 FunctionEnd
 
-Function AddQuickLaunchShortcut
-  CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}"
-  ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk"
-    ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" \
-                                           "$INSTDIR"
-  ${EndIf}
-FunctionEnd
-
 Function ExecSetAsDefaultAppUser
   ; Using the helper.exe lessens the stub installer size.
   ; This could ask for elevatation when the user doesn't install as admin.
   Exec "$\"$INSTDIR\uninstall\helper.exe$\" /SetAsDefaultAppUser"
 FunctionEnd
 
 Function LaunchApp
 !ifndef DEV_EDITION
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -24,17 +24,17 @@ RequestExecutionLevel user
 !ifdef NSIS_PACKEDVERSION
   Unicode true
   ManifestSupportedOS all
   ManifestDPIAware true
 !endif
 
 !addplugindir ./
 
-; On Vista and above attempt to elevate Standard Users in addition to users that
+; Attempt to elevate Standard Users in addition to users that
 ; are a member of the Administrators group.
 !define NONADMIN_ELEVATE
 
 ; prevents compiling of the reg write logging.
 !define NO_LOG
 
 !define MaintUninstallKey \
  "Software\Microsoft\Windows\CurrentVersion\Uninstall\MozillaMaintenanceService"
@@ -252,17 +252,17 @@ Section "Uninstall"
   ${un.DeleteShortcuts}
 
   ; Unregister resources associated with Win7 taskbar jump lists.
   ${If} ${AtLeastWin7}
   ${AndIf} "$AppUserModelID" != ""
     ApplicationID::UninstallJumpLists "$AppUserModelID"
   ${EndIf}
 
-  ; Remove the updates directory for Vista and above
+  ; Remove the updates directory
   ${un.CleanUpdateDirectories} "Mozilla\Firefox" "Mozilla\updates"
 
   ; Remove any app model id's stored in the registry for this install path
   DeleteRegValue HKCU "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
   DeleteRegValue HKLM "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
 
   ClearErrors
   WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -5649,17 +5649,17 @@
   !verbose pop
 !macroend
 
 
 ################################################################################
 # UAC Related Macros
 
 /**
- * Provides UAC elevation support for Vista and above (requires the UAC plugin).
+ * Provides UAC elevation support (requires the UAC plugin).
  *
  * $0 = return values from calls to the UAC plugin (always uses $0)
  * $R9 = return values from GetParameters and GetOptions macros
  */
 !macro ElevateUAC
 
   !ifndef ${_MOZFUNC_UN}ElevateUAC
     !define _MOZFUNC_UN_TMP ${_MOZFUNC_UN}
@@ -5673,97 +5673,93 @@
     !verbose ${_MOZFUNC_VERBOSE}
     !define ${_MOZFUNC_UN}ElevateUAC "!insertmacro ${_MOZFUNC_UN}ElevateUACCall"
 
     Function ${_MOZFUNC_UN}ElevateUAC
       Push $R9
       Push $0
 
 !ifndef NONADMIN_ELEVATE
-        ${If} ${AtLeastWinVista}
-          UAC::IsAdmin
-          ; If the user is not an admin already
-          ${If} "$0" != "1"
-            UAC::SupportsUAC
-            ; If the system supports UAC
-            ${If} "$0" == "1"
-              UAC::GetElevationType
-              ; If the user account has a split token
-              ${If} "$0" == "3"
-                UAC::RunElevated
-                UAC::Unload
-                ; Nothing besides UAC initialized so no need to call OnEndCommon
-                Quit
-              ${EndIf}
-            ${EndIf}
-          ${Else}
-            ${GetParameters} $R9
-            ${If} $R9 != ""
-              ClearErrors
-              ${GetOptions} "$R9" "/UAC:" $0
-              ; If the command line contains /UAC then we need to initialize
-              ; the UAC plugin to use UAC::ExecCodeSegment to execute code in
-              ; the non-elevated context.
-              ${Unless} ${Errors}
-                UAC::RunElevated
-              ${EndUnless}
-            ${EndIf}
+      UAC::IsAdmin
+      ; If the user is not an admin already
+      ${If} "$0" != "1"
+        UAC::SupportsUAC
+        ; If the system supports UAC
+        ${If} "$0" == "1"
+          UAC::GetElevationType
+          ; If the user account has a split token
+          ${If} "$0" == "3"
+            UAC::RunElevated
+            UAC::Unload
+            ; Nothing besides UAC initialized so no need to call OnEndCommon
+            Quit
           ${EndIf}
         ${EndIf}
+      ${Else}
+        ${GetParameters} $R9
+        ${If} $R9 != ""
+          ClearErrors
+          ${GetOptions} "$R9" "/UAC:" $0
+          ; If the command line contains /UAC then we need to initialize
+          ; the UAC plugin to use UAC::ExecCodeSegment to execute code in
+          ; the non-elevated context.
+          ${Unless} ${Errors}
+            UAC::RunElevated
+          ${EndUnless}
+        ${EndIf}
+      ${EndIf}
 !else
-      ${If} ${AtLeastWinVista}
-        UAC::IsAdmin
-        ; If the user is not an admin already
-        ${If} "$0" != "1"
-          UAC::SupportsUAC
-          ; If the system supports UAC require that the user elevate
-          ${If} "$0" == "1"
-            UAC::GetElevationType
-            ; If the user account has a split token
-            ${If} "$0" == "3"
-              UAC::RunElevated
+      UAC::IsAdmin
+      ; If the user is not an admin already
+      ${If} "$0" != "1"
+        UAC::SupportsUAC
+        ; If the system supports UAC require that the user elevate
+        ${If} "$0" == "1"
+          UAC::GetElevationType
+          ; If the user account has a split token
+          ${If} "$0" == "3"
+            UAC::RunElevated
+            UAC::Unload
+            ; Nothing besides UAC initialized so no need to call OnEndCommon
+            Quit
+          ${EndIf}
+        ${Else}
+          ; Check if UAC is enabled. If the user has turned UAC on or off
+          ; without rebooting this value will be incorrect. This is an
+          ; edgecase that we have to live with when trying to allow
+          ; installing when the user doesn't have privileges such as a public
+          ; computer while trying to also achieve UAC elevation. When this
+          ; happens the user will be presented with the runas dialog if the
+          ; value is 1 and won't be presented with the UAC dialog when the
+          ; value is 0.
+          ReadRegDWord $R9 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "EnableLUA"
+          ${If} "$R9" == "1"
+            ; This will display the UAC version of the runas dialog which
+            ; requires a password for an existing user account.
+            UAC::RunElevated
+            ${If} "$0" == "0" ; Was elevation successful
               UAC::Unload
               ; Nothing besides UAC initialized so no need to call OnEndCommon
               Quit
             ${EndIf}
-          ${Else}
-            ; Check if UAC is enabled. If the user has turned UAC on or off
-            ; without rebooting this value will be incorrect. This is an
-            ; edgecase that we have to live with when trying to allow
-            ; installing when the user doesn't have privileges such as a public
-            ; computer while trying to also achieve UAC elevation. When this
-            ; happens the user will be presented with the runas dialog if the
-            ; value is 1 and won't be presented with the UAC dialog when the
-            ; value is 0.
-            ReadRegDWord $R9 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "EnableLUA"
-            ${If} "$R9" == "1"
-              ; This will display the UAC version of the runas dialog which
-              ; requires a password for an existing user account.
-              UAC::RunElevated
-              ${If} "$0" == "0" ; Was elevation successful
-                UAC::Unload
-                ; Nothing besides UAC initialized so no need to call OnEndCommon
-                Quit
-              ${EndIf}
-              ; Unload UAC since the elevation request was not successful and
-              ; install anyway.
-              UAC::Unload
-            ${EndIf}
+            ; Unload UAC since the elevation request was not successful and
+            ; install anyway.
+            UAC::Unload
           ${EndIf}
-        ${Else}
-          ClearErrors
-          ${${_MOZFUNC_UN}GetParameters} $R9
-          ${${_MOZFUNC_UN}GetOptions} "$R9" "/UAC:" $R9
-          ; If the command line contains /UAC then we need to initialize the UAC
-          ; plugin to use UAC::ExecCodeSegment to execute code in the
-          ; non-elevated context.
-          ${Unless} ${Errors}
-            UAC::RunElevated
-          ${EndUnless}
         ${EndIf}
+      ${Else}
+        ClearErrors
+        ${${_MOZFUNC_UN}GetParameters} $R9
+        ${${_MOZFUNC_UN}GetOptions} "$R9" "/UAC:" $R9
+        ; If the command line contains /UAC then we need to initialize the UAC
+        ; plugin to use UAC::ExecCodeSegment to execute code in the
+        ; non-elevated context.
+        ${Unless} ${Errors}
+          UAC::RunElevated
+        ${EndUnless}
       ${EndIf}
 !endif
 
       ClearErrors
 
       Pop $0
       Pop $R9
     FunctionEnd
@@ -5817,20 +5813,16 @@
     !define _MOZFUNC_UN ${_MOZFUNC_UN_TMP_UnloadUAC}
     !undef _MOZFUNC_UN_TMP_UnloadUAC
 
     !verbose push
     !verbose ${_MOZFUNC_VERBOSE}
     !define ${_MOZFUNC_UN}UnloadUAC "!insertmacro ${_MOZFUNC_UN}UnloadUACCall"
 
     Function ${_MOZFUNC_UN}UnloadUAC
-      ${Unless} ${AtLeastWinVista}
-        Return
-      ${EndUnless}
-
       Push $R9
 
       ClearErrors
       ${${_MOZFUNC_UN}GetParameters} $R9
       ${${_MOZFUNC_UN}GetOptions} "$R9" "/UAC:" $R9
       ; If the command line contains /UAC then we need to unload the UAC plugin
       IfErrors +2 +1
       UAC::Unload
@@ -6432,18 +6424,18 @@
 !macroend
 !define DeleteShortcutsLogFile "!insertmacro DeleteShortcutsLogFile"
 
 
 ################################################################################
 # Macros for managing specific Windows version features
 
 /**
- * Sets the permitted layered service provider (LSP) categories on Windows
- * Vista and above for the application. Consumers should call this after an
+ * Sets the permitted layered service provider (LSP) categories
+ * for the application. Consumers should call this after an
  * installation log section has completed since this macro will log the results
  * to the installation log along with a header.
  *
  * !IMPORTANT - When calling this macro from an uninstaller do not specify a
  *              parameter. The paramter is hardcoded with 0x00000000 to remove
  *              the LSP category for the application when performing an
  *              uninstall.
  *
@@ -6466,20 +6458,16 @@
     !define _MOZFUNC_UN ${_MOZFUNC_UN_TMP}
     !undef _MOZFUNC_UN_TMP
 
     !verbose push
     !verbose ${_MOZFUNC_VERBOSE}
     !define ${_MOZFUNC_UN}SetAppLSPCategories "!insertmacro ${_MOZFUNC_UN}SetAppLSPCategoriesCall"
 
     Function ${_MOZFUNC_UN}SetAppLSPCategories
-      ${Unless} ${AtLeastWinVista}
-        Return
-      ${EndUnless}
-
       Exch $R9
       Push $R8
       Push $R7
       Push $R6
       Push $R5
 
       ${${_MOZFUNC_UN}GetLongPath} "$INSTDIR\${FileMainEXE}" $R8
       StrLen $R7 "$R8"