Bug 1328445 Part -1 - Backout Windows 7 restriction and 64-bit support in the stub installer
authorMatt Howell <mhowell@mozilla.com>
Thu, 12 Jan 2017 13:21:11 -0800
changeset 491584 d484aeab6c82b0e0997ba9dd0871f9d8a0b10e2e
parent 491583 783b6154bf74813260ecbd25783a731247535a3e
child 491585 4c48901c30969f471b5ce931c748a429fc653722
push id47343
push userbmo:dothayer@mozilla.com
push dateWed, 01 Mar 2017 22:58:58 +0000
bugs1328445
milestone53.0a1
Bug 1328445 Part -1 - Backout Windows 7 restriction and 64-bit support in the stub installer
browser/branding/aurora/branding.nsi
browser/branding/nightly/branding.nsi
browser/branding/official/branding.nsi
browser/branding/unofficial/branding.nsi
browser/installer/windows/nsis/defines.nsi.in
browser/installer/windows/nsis/installer.nsi
browser/installer/windows/nsis/maintenanceservice_installer.nsi
browser/installer/windows/nsis/stub.nsi
browser/locales/en-US/installer/nsisstrings.properties
toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/browser/branding/aurora/branding.nsi
+++ b/browser/branding/aurora/branding.nsi
@@ -9,18 +9,17 @@
 # BrandFullNameInternal is used for some registry and file system values
 # instead of BrandFullName and typically should not be modified.
 !define BrandFullNameInternal "Firefox Developer Edition"
 !define BrandShortName        "Firefox Developer Edition"
 !define CompanyName           "mozilla.org"
 !define URLInfoAbout          "https://www.mozilla.org"
 !define HelpLink              "https://support.mozilla.org"
 
-!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-aurora-latest"
-!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-aurora-latest"
+!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-aurora-latest"
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=aurora&installer_lang=${AB_CD}"
 !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
 !define Channel "aurora"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
--- a/browser/branding/nightly/branding.nsi
+++ b/browser/branding/nightly/branding.nsi
@@ -8,18 +8,17 @@
 
 # BrandFullNameInternal is used for some registry and file system values
 # instead of BrandFullName and typically should not be modified.
 !define BrandFullNameInternal "Nightly"
 !define CompanyName           "mozilla.org"
 !define URLInfoAbout          "https://www.mozilla.org"
 !define HelpLink              "https://support.mozilla.org"
 
-!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-nightly-latest"
-!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-nightly-latest"
+!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-nightly-latest"
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=nightly&installer_lang=${AB_CD}"
 !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
 !define Channel "nightly"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
--- a/browser/branding/official/branding.nsi
+++ b/browser/branding/official/branding.nsi
@@ -13,18 +13,17 @@
 !define URLInfoAbout          "https://www.mozilla.org"
 !define URLUpdateInfo         "https://www.mozilla.org/firefox/${AppVersion}/releasenotes"
 !define HelpLink              "https://support.mozilla.org"
 
 ; The OFFICIAL define is a workaround to support different urls for Release and
 ; Beta since they share the same branding when building with other branches that
 ; set the update channel to beta.
 !define OFFICIAL
-!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
-!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
+!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
 !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
 !define Channel "release"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
--- a/browser/branding/unofficial/branding.nsi
+++ b/browser/branding/unofficial/branding.nsi
@@ -8,18 +8,17 @@
 
 # BrandFullNameInternal is used for some registry and file system values
 # instead of BrandFullName and typically should not be modified.
 !define BrandFullNameInternal "Mozilla Developer Preview"
 !define CompanyName           "mozilla.org"
 !define URLInfoAbout          "https://www.mozilla.org"
 !define HelpLink              "https://support.mozilla.org"
 
-!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
-!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-latest"
+!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-latest"
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=release&installer_lang=${AB_CD}"
 !define URLSystemRequirements "https://www.mozilla.org/firefox/system-requirements/"
 !define Channel "unofficial"
 
 # The installer's certificate name and issuer expected by the stub installer
 !define CertNameDownload   "Mozilla Corporation"
 !define CertIssuerDownload "DigiCert SHA2 Assured ID Code Signing CA"
 
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -65,18 +65,18 @@
 
 # ARCH is used when it is necessary to differentiate the x64 registry keys from
 # the x86 registry keys (e.g. the uninstall registry key).
 #ifdef HAVE_64BIT_BUILD
 !define HAVE_64BIT_BUILD
 !define ARCH "x64"
 !define MinSupportedVer "Microsoft Windows 7 x64"
 #else
-!define MinSupportedVer "Microsoft Windows 7"
 !define ARCH "x86"
+!define MinSupportedVer "Microsoft Windows XP SP2"
 #endif
 
 !define MinSupportedCPU "SSE2"
 
 #ifdef MOZ_MAINTENANCE_SERVICE
 !define MOZ_MAINTENANCE_SERVICE
 #endif
 
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -1133,47 +1133,78 @@ Function .onInit
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
   StrCpy $PageName ""
   StrCpy $LANGUAGE 0
   ${SetBrandNameVars} "$EXEDIR\core\distribution\setup.ini"
 
   ; Don't install on systems that don't support SSE2. The parameter value of
   ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
-  ; SSE2 instruction set is available. Result returned in $R7.
+  ; SSE2 instruction set is available.
   System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
 
-  ; Windows NT 6.0 (Vista/Server 2008) and lower are not supported.
-  ${Unless} ${AtLeastWin7}
+!ifdef HAVE_64BIT_BUILD
+  ; Restrict x64 builds from being installed on x86 and pre Win7
+  ${Unless} ${RunningX64}
+  ${OrUnless} ${AtLeastWin7}
     ${If} "$R7" == "0"
       strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
     ${Else}
       strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
     ${EndIf}
     MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
     ExecShell "open" "${URLSystemRequirements}"
     Quit
   ${EndUnless}
 
-  ; SSE2 CPU support
+  SetRegView 64
+!else
+  StrCpy $R8 "0"
+  ${If} ${AtMostWin2000}
+    StrCpy $R8 "1"
+  ${EndIf}
+
+  ${If} ${IsWinXP}
+  ${AndIf} ${AtMostServicePack} 1
+    StrCpy $R8 "1"
+  ${EndIf}
+
+  ${If} $R8 == "1"
+    ; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
+    ; used to use for an unknown reason and likely fail the AtMostWin2000
+    ; and possibly the IsWinXP test as well. To work around this also
+    ; check if the Windows NT registry Key exists and if it does if the
+    ; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
+    ; 3.5.1), 4 (Windows NT 4), or 5 (Windows 2000 and Windows XP).
+    StrCpy $R8 ""
+    ClearErrors
+    ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
+    StrCpy $R8 "$R8" 1
+    ${If} ${Errors}
+    ${OrIf} "$R8" == "3"
+    ${OrIf} "$R8" == "4"
+    ${OrIf} "$R8" == "5"
+      ${If} "$R7" == "0"
+        strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
+      ${Else}
+        strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
+      ${EndIf}
+      MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
+      ExecShell "open" "${URLSystemRequirements}"
+      Quit
+    ${EndIf}
+  ${EndUnless}
+!endif
+
   ${If} "$R7" == "0"
     MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
     ExecShell "open" "${URLSystemRequirements}"
     Quit
   ${EndIf}
 
-!ifdef HAVE_64BIT_BUILD
-  ${Unless} ${RunningX64}
-    MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_OSVER_MSG)" IDCANCEL +2
-    ExecShell "open" "${URLSystemRequirements}"
-    Quit
-  ${EndUnless}
-  SetRegView 64
-!endif
-
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
 
 ; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
 ; removed after we require NSIS 3.0a2 or greater.
 !ifndef NSIS_PACKEDVERSION
   ${If} ${AtLeastWinVista}
     System::Call 'user32::SetProcessDPIAware()'
   ${EndIf}
--- a/browser/installer/windows/nsis/maintenanceservice_installer.nsi
+++ b/browser/installer/windows/nsis/maintenanceservice_installer.nsi
@@ -115,17 +115,20 @@ BrandingText " "
 
 Function .onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
   SetSilent silent
 
-  ${Unless} ${AtLeastWin7}
+  ; On Windows 2000 we do not install the maintenance service.
+  ; We won't run this installer from the parent installer, but just in case 
+  ; someone tries to execute it on Windows 2000...
+  ${Unless} ${AtLeastWinXP}
     Abort
   ${EndUnless}
 FunctionEnd
 
 Function un.onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -30,20 +30,21 @@ RequestExecutionLevel user
 
 Var Dialog
 Var Progressbar
 Var ProgressbarMarqueeIntervalMS
 Var LabelDownloading
 Var LabelInstalling
 Var LabelFreeSpace
 Var CheckboxSetAsDefault
-Var CheckboxShortcuts
+Var CheckboxShortcutOnBar ; Used for Quicklaunch or Taskbar as appropriate
+Var CheckboxShortcutInStartMenu
+Var CheckboxShortcutOnDesktop
 Var CheckboxSendPing
 Var CheckboxInstallMaintSvc
-Var DroplistArch
 Var DirRequest
 Var ButtonBrowse
 Var LabelBlurb1
 Var LabelBlurb2
 Var LabelBlurb3
 Var BitmapBlurb1
 Var BitmapBlurb2
 Var BitmapBlurb3
@@ -67,16 +68,17 @@ Var SpaceAvailableBytes
 Var InitialInstallDir
 Var HandleDownload
 Var CanSetAsDefault
 Var InstallCounterStep
 Var InstallStepSize
 Var InstallTotalSteps
 Var ProgressCompleted
 Var ProgressTotal
+Var TmpVal
 
 Var ExitCode
 Var FirefoxLaunchCode
 
 ; The first three tick counts are for the start of a phase and equate equate to
 ; the display of individual installer pages.
 Var StartIntroPhaseTickCount
 Var StartOptionsPhaseTickCount
@@ -101,18 +103,16 @@ Var InitialInstallRequirementsCode
 Var ExistingProfile
 Var ExistingVersion
 Var ExistingBuildID
 Var DownloadedBytes
 Var DownloadRetryCount
 Var OpenedDownloadPage
 Var DownloadServerIP
 Var PostSigningData
-Var PreviousInstallDir
-Var PreviousInstallArch
 
 Var ControlHeightPX
 Var ControlRightPX
 
 ; Uncomment the following to prevent pinging the metrics server when testing
 ; the stub installer
 ;!define STUB_DEBUG
 
@@ -213,51 +213,43 @@ Var ControlRightPX
 !endif
 !ifndef OPEN_EXISTING
   !define OPEN_EXISTING 3
 !endif
 !ifndef INVALID_HANDLE_VALUE
   !define INVALID_HANDLE_VALUE -1
 !endif
 
-!define DefaultInstDir32bit "$PROGRAMFILES32\${BrandFullName}"
-!define DefaultInstDir64bit "$PROGRAMFILES64\${BrandFullName}"
-
 !include "nsDialogs.nsh"
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !include "TextFunc.nsh"
 !include "WinVer.nsh"
 !include "WordFunc.nsh"
 
 !insertmacro GetParameters
 !insertmacro GetOptions
 !insertmacro LineFind
 !insertmacro StrFilter
 
-!include "StrFunc.nsh"
-${StrTok}
-
 !include "locales.nsi"
 !include "branding.nsi"
 
 !include "defines.nsi"
 
 ; Must be included after defines.nsi
 !include "locale-fonts.nsh"
 
 ; The OFFICIAL define is a workaround to support different urls for Release and
 ; Beta since they share the same branding when building with other branches that
 ; set the update channel to beta.
 !ifdef OFFICIAL
 !ifdef BETA_UPDATE_CHANNEL
-!undef URLStubDownload32
-!undef URLStubDownload64
-!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-beta-latest"
-!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-beta-latest"
+!undef URLStubDownload
+!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-beta-latest"
 !undef URLManualDownload
 !define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=beta&installer_lang=${AB_CD}"
 !undef Channel
 !define Channel "beta"
 !endif
 !endif
 
 !include "common.nsh"
@@ -278,16 +270,21 @@ VIAddVersionKey "FileDescription" "${Bra
 VIAddVersionKey "OriginalFilename" "setup-stub.exe"
 
 Name "$BrandFullName"
 OutFile "setup-stub.exe"
 icon "setup.ico"
 XPStyle on
 BrandingText " "
 ChangeUI all "nsisui.exe"
+!ifdef HAVE_64BIT_BUILD
+  InstallDir "$PROGRAMFILES64\${BrandFullName}\"
+!else
+  InstallDir "$PROGRAMFILES32\${BrandFullName}\"
+!endif
 
 !ifdef ${AB_CD}_rtl
   LoadLanguageFile "locale-rtl.nlf"
 !else
   LoadLanguageFile "locale.nlf"
 !endif
 
 !include "nsisstrings.nlf"
@@ -319,108 +316,117 @@ Function .onInit
   ; isn't supported for the stub installer.
   ${SetBrandNameVars} "$PLUGINSDIR\ignored.ini"
 
   ; Don't install on systems that don't support SSE2. The parameter value of
   ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
   ; SSE2 instruction set is available.
   System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
 
-  ; Windows NT 6.0 (Vista/Server 2008) and lower are not supported.
-  ${Unless} ${AtLeastWin7}
+!ifdef HAVE_64BIT_BUILD
+  ; Restrict x64 builds from being installed on x86 and pre Win7
+  ${Unless} ${RunningX64}
+  ${OrUnless} ${AtLeastWin7}
     ${If} "$R7" == "0"
       strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
     ${Else}
       strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
     ${EndIf}
     MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
     ExecShell "open" "${URLSystemRequirements}"
     Quit
   ${EndUnless}
 
-  ; SSE2 CPU support
+  SetRegView 64
+!else
+  StrCpy $R8 "0"
+  ${If} ${AtMostWin2000}
+    StrCpy $R8 "1"
+  ${EndIf}
+
+  ${If} ${IsWinXP}
+  ${AndIf} ${AtMostServicePack} 1
+    StrCpy $R8 "1"
+  ${EndIf}
+
+  ${If} $R8 == "1"
+    ; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
+    ; used to use for an unknown reason and likely fail the AtMostWin2000
+    ; and possibly the IsWinXP test as well. To work around this also
+    ; check if the Windows NT registry Key exists and if it does if the
+    ; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
+    ; 3.5.1), 4 (Windows NT 4), or 5 (Windows 2000 and Windows XP).
+    StrCpy $R8 ""
+    ClearErrors
+    ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
+    StrCpy $R8 "$R8" 1
+    ${If} ${Errors}
+    ${OrIf} "$R8" == "3"
+    ${OrIf} "$R8" == "4"
+    ${OrIf} "$R8" == "5"
+      ${If} "$R7" == "0"
+        strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
+      ${Else}
+        strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
+      ${EndIf}
+      MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
+      ExecShell "open" "${URLSystemRequirements}"
+      Quit
+    ${EndIf}
+  ${EndUnless}
+!endif
+
   ${If} "$R7" == "0"
     MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
     ExecShell "open" "${URLSystemRequirements}"
     Quit
   ${EndIf}
 
-  ${If} ${RunningX64}
-    StrCpy $INSTDIR "${DefaultInstDir64bit}"
-  ${Else}
-    StrCpy $INSTDIR "${DefaultInstDir32bit}"
-  ${EndIf}
-
   ; Require elevation if the user can elevate
   ${ElevateUAC}
 
 ; The commands inside this ifndef are needed prior to NSIS 3.0a2 and can be
 ; removed after we require NSIS 3.0a2 or greater.
 !ifndef NSIS_PACKEDVERSION
   ${If} ${AtLeastWinVista}
     System::Call 'user32::SetProcessDPIAware()'
   ${EndIf}
 !endif
 
-  ; If we have any existing installation, use its location as the default
-  ; path for this install, even if it's not the same architecture.
-  SetRegView 32
   SetShellVarContext all ; Set SHCTX to HKLM
   ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
 
   ${If} "$R9" == "false"
-  ${AndIf} ${RunningX64}
-    SetRegView 64
-    ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
-  ${EndIf}
-
-  ${If} "$R9" == "false"
     SetShellVarContext current ; Set SHCTX to HKCU
     ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
 
     ${If} ${RunningX64}
       ; In HKCU there is no WOW64 redirection, which means we may have gotten
-      ; the path to a 32-bit install even though we're 64-bit.
+      ; the path to a 32-bit install even though we're 64-bit, or vice-versa.
       ; In that case, just use the default path instead of offering an upgrade.
       ; But only do that override if the existing install is in Program Files,
       ; because that's the only place we can be sure is specific
       ; to either 32 or 64 bit applications.
       ; The WordFind syntax below searches for the first occurence of the
       ; "delimiter" (the Program Files path) in the install path and returns
       ; anything that appears before that. If nothing appears before that,
-      ; then the install is under Program Files.
+      ; then the install is under Program Files (32 or 64).
+!ifdef HAVE_64BIT_BUILD
       ${WordFind} $R9 $PROGRAMFILES32 "+1{" $0
+!else
+      ${WordFind} $R9 $PROGRAMFILES64 "+1{" $0
+!endif
       ${If} $0 == ""
         StrCpy $R9 "false"
       ${EndIf}
     ${EndIf}
   ${EndIf}
 
-  StrCpy $PreviousInstallDir ""
-  StrCpy $PreviousInstallArch ""
   ${If} "$R9" != "false"
-    ; Don't override the default install path with an existing installation
-    ; of a different architecture.
-    System::Call "*(i)p.r0"
-    StrCpy $1 "$R9\${FileMainEXE}"
-    System::Call "Kernel32::GetBinaryTypeW(w r1, p r0)i"
-    System::Call "*$0(i.r2)"
-    System::Free $0
-
-    ${If} $2 == "6" ; 6 == SCS_64BIT_BINARY
-    ${AndIf} ${RunningX64}
-      StrCpy $PreviousInstallDir "$R9"
-      StrCpy $PreviousInstallArch "64"
-      StrCpy $INSTDIR "$PreviousInstallDir"
-    ${ElseIf} $2 == "0" ; 0 == SCS_32BIT_BINARY
-    ${AndIfNot} ${RunningX64}
-      StrCpy $PreviousInstallDir "$R9"
-      StrCpy $PreviousInstallArch "32"
-      StrCpy $INSTDIR "$PreviousInstallDir"
-    ${EndIf}
+    StrCpy $INSTDIR "$R9"
   ${EndIf}
 
   ; Used to determine if the default installation directory was used.
   StrCpy $InitialInstallDir "$INSTDIR"
 
   ClearErrors
   WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
                    "Write Test"
@@ -447,29 +453,26 @@ Function .onInit
   ; when a page is displayed.
   StrCpy $IntroPhaseSeconds "0"
   StrCpy $OptionsPhaseSeconds "0"
   StrCpy $EndPreInstallPhaseTickCount "0"
   StrCpy $EndInstallPhaseTickCount "0"
   StrCpy $InitialInstallRequirementsCode ""
   StrCpy $IsDownloadFinished ""
   StrCpy $FirefoxLaunchCode "0"
-  StrCpy $CheckboxShortcuts "1"
+  StrCpy $CheckboxShortcutOnBar "1"
+  StrCpy $CheckboxShortcutInStartMenu "1"
+  StrCpy $CheckboxShortcutOnDesktop "1"
   StrCpy $CheckboxSendPing "1"
 !ifdef MOZ_MAINTENANCE_SERVICE
   StrCpy $CheckboxInstallMaintSvc "1"
 !else
   StrCpy $CheckboxInstallMaintSvc "0"
 !endif
   StrCpy $WasOptionsButtonClicked "0"
-  ${If} ${RunningX64}
-    StrCpy $DroplistArch "$(VERSION_64BIT)"
-  ${Else}
-    StrCpy $DroplistArch "$(VERSION_32BIT)"
-  ${EndIf}
 
   StrCpy $0 ""
 !ifdef FONT_FILE1
   ${If} ${FileExists} "$FONTS\${FONT_FILE1}"
     StrCpy $0 "${FONT_NAME1}"
   ${EndIf}
 !endif
 
@@ -603,21 +606,21 @@ Function SendPing
     ; Get the seconds elapsed from the end of the pre-installation check phase
     ; to the completion of the installation phase.
     ${GetSecondsElapsed} "$EndPreInstallPhaseTickCount" "$EndInstallPhaseTickCount" $3
 
     ; Get the seconds elapsed from the end of the installation phase to the
     ; completion of all phases.
     ${GetSecondsElapsed} "$EndInstallPhaseTickCount" "$EndFinishPhaseTickCount" $4
 
-    ${If} $DroplistArch == "$(VERSION_64BIT)"
-      StrCpy $R0 "1"
-    ${Else}
-      StrCpy $R0 "0"
-    ${EndIf}
+!ifdef HAVE_64BIT_BUILD
+    StrCpy $R0 "1"
+!else
+    StrCpy $R0 "0"
+!endif
 
     ${If} ${RunningX64}
       StrCpy $R1 "1"
     ${Else}
       StrCpy $R1 "0"
     ${EndIf}
 
     ; Though these values are sometimes incorrect due to bug 444664 it happens
@@ -931,39 +934,80 @@ Function createOptions
   StrCpy $ExistingTopDir ""
 
   nsDialogs::Create /NOUNLOAD 1018
   Pop $Dialog
   ; Since the text color for controls is set in this Dialog the foreground and
   ; background colors of the Dialog must also be hardcoded.
   SetCtlColors $Dialog ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
 
-  ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 25u ${OPTIONS_ITEM_WIDTH_DU} \
+  ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 18u ${OPTIONS_ITEM_WIDTH_DU} \
+                     12u "$(CREATE_SHORTCUTS)"
+  Pop $0
+  SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+  SendMessage $0 ${WM_SETFONT} $FontNormal 0
+
+  ${If} ${AtLeastWin7}
+    StrCpy $0 "$(ADD_SC_TASKBAR)"
+  ${Else}
+    StrCpy $0 "$(ADD_SC_QUICKLAUNCHBAR)"
+  ${EndIf}
+  ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 38u \
+                        ${OPTIONS_SUBITEM_WIDTH_DU} 12u "$0"
+  Pop $CheckboxShortcutOnBar
+  ; The uxtheme must be disabled on checkboxes in order to override the system
+  ; font color.
+  System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnBar, w " ", w " ")'
+  SetCtlColors $CheckboxShortcutOnBar ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+  SendMessage $CheckboxShortcutOnBar ${WM_SETFONT} $FontNormal 0
+  ${NSD_Check} $CheckboxShortcutOnBar
+
+  ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 54u ${OPTIONS_SUBITEM_WIDTH_DU} \
+                        12u "$(ADD_CheckboxShortcutInStartMenu)"
+  Pop $CheckboxShortcutInStartMenu
+  ; The uxtheme must be disabled on checkboxes in order to override the system
+  ; font color.
+  System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutInStartMenu, w " ", w " ")'
+  SetCtlColors $CheckboxShortcutInStartMenu ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+  SendMessage $CheckboxShortcutInStartMenu ${WM_SETFONT} $FontNormal 0
+  ${NSD_Check} $CheckboxShortcutInStartMenu
+
+  ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 70u ${OPTIONS_SUBITEM_WIDTH_DU} \
+                        12u "$(ADD_CheckboxShortcutOnDesktop)"
+  Pop $CheckboxShortcutOnDesktop
+  ; The uxtheme must be disabled on checkboxes in order to override the system
+  ; font color.
+  System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnDesktop, w " ", w " ")'
+  SetCtlColors $CheckboxShortcutOnDesktop ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+  SendMessage $CheckboxShortcutOnDesktop ${WM_SETFONT} $FontNormal 0
+  ${NSD_Check} $CheckboxShortcutOnDesktop
+
+  ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 100u ${OPTIONS_ITEM_WIDTH_DU} \
                      12u "$(DEST_FOLDER)"
   Pop $0
   SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
   SendMessage $0 ${WM_SETFONT} $FontNormal 0
 
-  ${NSD_CreateDirRequest} ${OPTIONS_SUBITEM_EDGE_DU} 41u 159u 14u "$INSTDIR"
+  ${NSD_CreateDirRequest} ${OPTIONS_SUBITEM_EDGE_DU} 116u 159u 14u "$INSTDIR"
   Pop $DirRequest
   SetCtlColors $DirRequest ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
   SendMessage $DirRequest ${WM_SETFONT} $FontNormal 0
   System::Call shlwapi::SHAutoComplete(i $DirRequest, i ${SHACF_FILESYSTEM})
   ${NSD_OnChange} $DirRequest OnChange_DirRequest
 
 !ifdef ${AB_CD}_rtl
   ; Remove the RTL styling from the directory request text box
   ${RemoveStyle} $DirRequest ${SS_RIGHT}
   ${RemoveExStyle} $DirRequest ${WS_EX_RIGHT}
   ${RemoveExStyle} $DirRequest ${WS_EX_RTLREADING}
   ${NSD_AddStyle} $DirRequest ${SS_LEFT}
   ${NSD_AddExStyle} $DirRequest ${WS_EX_LTRREADING}|${WS_EX_LEFT}
 !endif
 
-  ${NSD_CreateBrowseButton} 280u 41u 50u 14u "$(BROWSE_BUTTON)"
+  ${NSD_CreateBrowseButton} 280u 116u 50u 14u "$(BROWSE_BUTTON)"
   Pop $ButtonBrowse
   SetCtlColors $ButtonBrowse "" ${COMMON_BKGRD_COLOR}
   ${NSD_OnClick} $ButtonBrowse OnClick_ButtonBrowse
 
   ; Get the number of pixels from the left of the Dialog to the right side of
   ; the "Space Required:" and "Space Available:" labels prior to setting RTL so
   ; the correct position of the controls can be set by NSIS for RTL locales.
 
@@ -974,184 +1018,99 @@ Function createOptions
   ${If} $1 > $3
     StrCpy $ControlHeightPX "$1"
   ${Else}
     StrCpy $ControlHeightPX "$3"
   ${EndIf}
 
   IntOp $0 $0 + 8 ; Add padding to the control's width
   ; Make both controls the same width as the widest control
-  ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 59u $0 $ControlHeightPX "$(SPACE_REQUIRED)"
+  ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 134u $0 $ControlHeightPX "$(SPACE_REQUIRED)"
   Pop $5
   SetCtlColors $5 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
   SendMessage $5 ${WM_SETFONT} $FontItalic 0
 
   IntOp $2 $2 + 8 ; Add padding to the control's width
-  ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 70u $2 $ControlHeightPX "$(SPACE_AVAILABLE)"
+  ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 145u $2 $ControlHeightPX "$(SPACE_AVAILABLE)"
   Pop $6
   SetCtlColors $6 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
   SendMessage $6 ${WM_SETFONT} $FontItalic 0
 
   ; Use the widest label for aligning the labels next to them
   ${If} $0 > $2
     StrCpy $6 "$5"
   ${EndIf}
   FindWindow $1 "#32770" "" $HWNDPARENT
   ${GetDlgItemEndPX} $6 $ControlRightPX
 
   IntOp $ControlRightPX $ControlRightPX + 6
 
-  ${NSD_CreateLabel} $ControlRightPX 59u 100% $ControlHeightPX \
+  ${NSD_CreateLabel} $ControlRightPX 134u 100% $ControlHeightPX \
                      "${APPROXIMATE_REQUIRED_SPACE_MB} $(MEGA)$(BYTE)"
   Pop $7
   SetCtlColors $7 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
   SendMessage $7 ${WM_SETFONT} $FontNormal 0
 
   ; Create the free space label with an empty string and update it by calling
   ; UpdateFreeSpaceLabel
-  ${NSD_CreateLabel} $ControlRightPX 70u 100% $ControlHeightPX " "
+  ${NSD_CreateLabel} $ControlRightPX 145u 100% $ControlHeightPX " "
   Pop $LabelFreeSpace
   SetCtlColors $LabelFreeSpace ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
   SendMessage $LabelFreeSpace ${WM_SETFONT} $FontNormal 0
 
   Call UpdateFreeSpaceLabel
 
-  ${If} ${AtLeastWin7}
-    StrCpy $0 "$(ADD_SC_DESKTOP_TASKBAR)"
-  ${Else}
-    StrCpy $0 "$(ADD_SC_DESKTOP_QUICKLAUNCHBAR)"
-  ${EndIf}
-  ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 100u \
-                        ${OPTIONS_ITEM_WIDTH_DU} 12u "$0"
-  Pop $CheckboxShortcuts
-  ; The uxtheme must be disabled on checkboxes in order to override the system
-  ; font color.
-  System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcuts, w " ", w " ")'
-  SetCtlColors $CheckboxShortcuts ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-  SendMessage $CheckboxShortcuts ${WM_SETFONT} $FontNormal 0
-  ${NSD_Check} $CheckboxShortcuts
-
-  ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 116u ${OPTIONS_SUBITEM_WIDTH_DU} \
+  ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 168u ${OPTIONS_SUBITEM_WIDTH_DU} \
                         12u "$(SEND_PING)"
   Pop $CheckboxSendPing
   ; The uxtheme must be disabled on checkboxes in order to override the system
   ; font color.
   System::Call 'uxtheme::SetWindowTheme(i $CheckboxSendPing, w " ", w " ")'
   SetCtlColors $CheckboxSendPing ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
   SendMessage $CheckboxSendPing ${WM_SETFONT} $FontNormal 0
   ${NSD_Check} $CheckboxSendPing
 
 !ifdef MOZ_MAINTENANCE_SERVICE
-  StrCpy $CheckboxInstallMaintSvc "0"
   ; We can only install the maintenance service if the user is an admin.
   Call IsUserAdmin
   Pop $0
 
   ; Only show the maintenance service checkbox if we're on XP SP3 or higher;
   ;  we don't ever want to install it on XP without at least SP3 installed.
   ${If} $0 == "true"
   ${AndIf} ${IsWinXP}
   ${AndIf} ${AtMostServicePack} 2
     StrCpy $0 "false"
   ${EndIf}
 
-  ${If} $0 == "true"
-    ; Only show the maintenance service checkbox if we have write access to HKLM
+  ; Only show the maintenance service checkbox if we have write access to HKLM
+  ClearErrors
+  WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
+                   "Write Test"
+  ${If} ${Errors}
+  ${OrIf} $0 != "true"
+    StrCpy $CheckboxInstallMaintSvc "0"
+  ${Else}
     DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
+    ; Read the registry instead of using ServicesHelper::IsInstalled so the
+    ; plugin isn't included in the stub installer to lessen its size.
     ClearErrors
-    WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
-                     "Write Test"
-    ${IfNot} ${Errors}
-      DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
-      ; Read the registry instead of using ServicesHelper::IsInstalled so the
-      ; plugin isn't included in the stub installer to lessen its size.
-      ClearErrors
-      ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\services\MozillaMaintenance" "ImagePath"
-      ${If} ${Errors}
-        ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 132u ${OPTIONS_ITEM_WIDTH_DU} \
-                              12u "$(INSTALL_MAINT_SERVICE)"
-        Pop $CheckboxInstallMaintSvc
-        System::Call 'uxtheme::SetWindowTheme(i $CheckboxInstallMaintSvc, w " ", w " ")'
-        SetCtlColors $CheckboxInstallMaintSvc ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-        SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
-        ${NSD_Check} $CheckboxInstallMaintSvc
-      ${EndIf}
+    ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\services\MozillaMaintenance" "ImagePath"
+    ${If} ${Errors}
+      ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 184u ${OPTIONS_ITEM_WIDTH_DU} \
+                            12u "$(INSTALL_MAINT_SERVICE)"
+      Pop $CheckboxInstallMaintSvc
+      System::Call 'uxtheme::SetWindowTheme(i $CheckboxInstallMaintSvc, w " ", w " ")'
+      SetCtlColors $CheckboxInstallMaintSvc ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+      SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
+      ${NSD_Check} $CheckboxInstallMaintSvc
     ${EndIf}
   ${EndIf}
 !endif
 
-  ${If} ${RunningX64}
-    ; Get the exact pixel width we're going to need for this label.
-    ; The label string has a keyboard accelerator, which is an '&' that's in
-    ; the string but is not rendered, and GetTextExtent doesn't account for
-    ; those, so remove them first. Also handle any escaped &'s ("&&").
-    StrCpy $R0 "$(ARCH_DROPLIST_LABEL)"
-    StrCpy $R1 ""
-    ${Do}
-      ${StrTok} $R2 $R0 "&" 0 0
-      StrCpy $R1 "$R1$R2"
-      StrLen $R3 $R2
-      IntOp $R3 $R3 + 1
-      StrCpy $R0 $R0 "" $R3
-      StrCpy $R4 $R0 1
-      ${If} $R4 == "&"
-        StrCpy $R1 "$R1&"
-        StrCpy $R0 $R0 "" 1
-      ${EndIf}
-    ${LoopUntil} $R0 == ""
-
-    ${GetTextExtent} $R1 $FontNormal $R0 $R1
-    ${If} $CheckboxInstallMaintSvc == "0"
-      ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 134u $R0 $R1 "$(ARCH_DROPLIST_LABEL)"
-    ${Else}
-      ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 154u $R0 $R1 "$(ARCH_DROPLIST_LABEL)"
-    ${EndIf}
-    Pop $0
-    SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-    SendMessage $0 ${WM_SETFONT} $FontNormal 0
-
-    ; Set the dropdown list size to the same as the larger of the two options.
-    ${GetTextExtent} "$(VERSION_32BIT)" $FontNormal $R0 $R1
-    ${GetTextExtent} "$(VERSION_64BIT)" $FontNormal $R2 $R3
-    ${If} $R0 < $R2
-      StrCpy $R0 $R2
-    ${EndIf}
-    ${If} $R1 < $R3
-      StrCpy $R3 $R1
-    ${EndIf}
-    ; Add enough width for the dropdown button. How wide the button is depends
-    ; on he system display scaling setting, which we cannot easily determine,
-    ; so just use a value that works fine for a setting of 200% and adds a
-    ; little too much padding for settings below that.
-    IntOp $R0 $R0 + 56
-
-    ; Put the droplist right after the label, with some padding.
-    ${GetDlgItemEndPX} $0 $ControlRightPX
-    IntOp $ControlRightPX $ControlRightPX + 4
-    ${If} $CheckboxInstallMaintSvc == "0"
-      ${NSD_CreateDropList} $ControlRightPX 132u $R0 $R3 ""
-    ${Else}
-      ${NSD_CreateDropList} $ControlRightPX 152u $R0 $R3 ""
-    ${EndIf}
-    Pop $DroplistArch
-    ${NSD_CB_AddString} $DroplistArch "$(VERSION_32BIT)"
-    ${NSD_CB_AddString} $DroplistArch "$(VERSION_64BIT)"
-    ${NSD_OnChange} $DroplistArch OnChange_DroplistArch
-    ; The uxtheme must be disabled in order to override the system colors.
-    System::Call 'uxtheme::SetWindowTheme(i $DroplistArch, w " ", w " ")'
-    SetCtlColors $DroplistArch ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
-    SendMessage $DroplistArch ${WM_SETFONT} $FontNormal 0
-
-    ${If} ${RunningX64}
-      ${NSD_CB_SelectString} $DroplistArch "$(VERSION_64BIT)"
-    ${Else}
-      ${NSD_CB_SelectString} $DroplistArch "$(VERSION_32BIT)"
-    ${EndIf}
-  ${EndIf}
-
   GetDlgItem $0 $HWNDPARENT 1 ; Install button
   ${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
     SendMessage $0 ${WM_SETTEXT} 0 "STR:$(UPGRADE_BUTTON)"
   ${Else}
     SendMessage $0 ${WM_SETTEXT} 0 "STR:$(INSTALL_BUTTON)"
   ${EndIf}
   ${NSD_SetFocus} $0
 
@@ -1209,18 +1168,19 @@ Function leaveOptions
   Pop $0
   ${GetSecondsElapsed} "$StartOptionsPhaseTickCount" "$0" $OptionsPhaseSeconds
   ; It is possible for this value to be 0 if the user clicks fast enough so
   ; increment the value by 1 if it is 0.
   ${If} $OptionsPhaseSeconds == 0
     IntOp $OptionsPhaseSeconds $OptionsPhaseSeconds + 1
   ${EndIf}
 
-  ${NSD_GetState} $CheckboxShortcuts $CheckboxShortcuts
-  ${NSD_GetText} $DroplistArch $DroplistArch
+  ${NSD_GetState} $CheckboxShortcutOnBar $CheckboxShortcutOnBar
+  ${NSD_GetState} $CheckboxShortcutInStartMenu $CheckboxShortcutInStartMenu
+  ${NSD_GetState} $CheckboxShortcutOnDesktop $CheckboxShortcutOnDesktop
   ${NSD_GetState} $CheckboxSendPing $CheckboxSendPing
 !ifdef MOZ_MAINTENANCE_SERVICE
   ${NSD_GetState} $CheckboxInstallMaintSvc $CheckboxInstallMaintSvc
 !endif
 
 FunctionEnd
 
 Function createInstall
@@ -1405,25 +1365,18 @@ Function createInstall
   ${NSD_FreeImage} $0
   ${NSD_FreeImage} $HwndBitmapBlurb1
   ${NSD_FreeImage} $HwndBitmapBlurb2
   ${NSD_FreeImage} $HWndBitmapBlurb3
 FunctionEnd
 
 Function StartDownload
   ${NSD_KillTimer} StartDownload
-  ${If} $DroplistArch == "$(VERSION_64BIT)"
-    InetBgDL::Get "${URLStubDownload64}${URLStubDownloadAppend}" \
-                  "$PLUGINSDIR\download.exe" \
-                  /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
-  ${Else}
-    InetBgDL::Get "${URLStubDownload32}${URLStubDownloadAppend}" \
-                  "$PLUGINSDIR\download.exe" \
-                  /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
-  ${EndIf}
+  InetBgDL::Get "${URLStubDownload}${URLStubDownloadAppend}" "$PLUGINSDIR\download.exe" \
+                /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
   StrCpy $4 ""
   ${NSD_CreateTimer} OnDownload ${DownloadIntervalMS}
   ${If} ${FileExists} "$INSTDIR\${TO_BE_DELETED}"
     RmDir /r "$INSTDIR\${TO_BE_DELETED}"
   ${EndIf}
 FunctionEnd
 
 Function SetProgressBars
@@ -1634,28 +1587,33 @@ Function OnDownload
 
       ; Instead of extracting the files we use the downloaded installer to
       ; install in case it needs to perform operations that the stub doesn't
       ; know about.
       WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "InstallDirectoryPath" "$INSTDIR"
       ; Don't create the QuickLaunch or Taskbar shortcut from the launched installer
       WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "QuickLaunchShortcut" "false"
 
-      ; Always create a start menu shortcut, so the user always has some way
-      ; to access the application.
-      WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "true"
-
-      ; Either avoid or force adding a taskbar pin and desktop shortcut
-      ; based on the checkbox value.
-      ${If} $CheckboxShortcuts == 0
+      ; Either avoid or force adding a taskbar pin based on the checkbox value:
+      ${If} $CheckboxShortcutOnBar == 0
         WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "false"
-        WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "false"
       ${Else}
         WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "true"
+      ${EndIf}
+
+      ${If} $CheckboxShortcutOnDesktop == 1
         WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "true"
+      ${Else}
+        WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "false"
+      ${EndIf}
+
+      ${If} $CheckboxShortcutInStartMenu == 1
+        WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "true"
+      ${Else}
+        WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "false"
       ${EndIf}
 
 !ifdef MOZ_MAINTENANCE_SERVICE
       ${If} $CheckboxInstallMaintSvc == 1
         WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "MaintenanceService" "true"
       ${Else}
         WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "MaintenanceService" "false"
       ${EndIf}
@@ -1822,17 +1780,17 @@ 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} $CheckboxShortcutOnBar == 1
     ${If} ${AtMostWinVista}
       ClearErrors
       ${GetParameters} $0
       ClearErrors
       ${GetOptions} "$0" "/UAC:" $0
       ${If} ${Errors}
         Call AddQuickLaunchShortcut
       ${Else}
@@ -1958,40 +1916,16 @@ Function OnClick_ButtonBrowse
   ${EndIf}
 
   ${If} $0 != ""
     StrCpy $INSTDIR "$0"
     System::Call 'user32::SetWindowTextW(i $DirRequest, w "$INSTDIR")'
   ${EndIf}
 FunctionEnd
 
-Function OnChange_DroplistArch
-  ; When the user changes the 32/64-bit setting, change the default install path
-  ; to use the correct version of Program Files. But only do that if the user
-  ; hasn't selected their own install path yet, and if we didn't select our
-  ; default as the location of an existing install.
-  ${If} $INSTDIR == $InitialInstallDir
-    ${NSD_GetText} $DroplistArch $0
-    ${If} $0 == "$(VERSION_32BIT)"
-      ${If} $PreviousInstallArch == 32
-        StrCpy $InitialInstallDir $PreviousInstallDir
-      ${Else}
-        StrCpy $InitialInstallDir "${DefaultInstDir32bit}"
-      ${EndIf}
-    ${Else}
-      ${If} $PreviousInstallArch == 64
-        StrCpy $InitialInstallDir $PreviousInstallDir
-      ${Else}
-        StrCpy $InitialInstallDir "${DefaultInstDir64bit}"
-      ${EndIf}
-    ${EndIf}
-    ${NSD_SetText} $DirRequest $InitialInstallDir
-  ${EndIf}
-FunctionEnd
-
 Function CheckSpace
   ${If} "$ExistingTopDir" != ""
     StrLen $0 "$ExistingTopDir"
     StrLen $1 "$INSTDIR"
     ${If} $0 <= $1
       StrCpy $2 "$INSTDIR" $3
       ${If} "$2" == "$ExistingTopDir"
         Return
@@ -2046,17 +1980,16 @@ Function CanWrite
         Return
       ${EndIf}
     ${Loop}
   ${EndUnless}
 
   GetTempFileName $2 "$0"
   Delete $2
   CreateDirectory "$2"
-
   ${If} ${FileExists} "$2"
     ${If} ${FileExists} "$INSTDIR"
       GetTempFileName $3 "$INSTDIR"
     ${Else}
       GetTempFileName $3 "$2"
     ${EndIf}
     ${If} ${FileExists} "$3"
       Delete "$3"
--- a/browser/locales/en-US/installer/nsisstrings.properties
+++ b/browser/locales/en-US/installer/nsisstrings.properties
@@ -36,21 +36,21 @@ WARN_MANUALLY_CLOSE_APP_LAUNCH=$BrandSho
 ERROR_DOWNLOAD=Your download was interrupted.\n\nPlease click the OK button to continue.
 
 INSTALL_BUTTON=&Install
 UPGRADE_BUTTON=&Upgrade
 CANCEL_BUTTON=Cancel
 OPTIONS_BUTTON=&Options
 
 MAKE_DEFAULT=&Make $BrandShortName my default browser
-ADD_SC_DESKTOP_TASKBAR=&Create desktop and taskbar shortcuts for $BrandShortName
-ADD_SC_DESKTOP_QUICKLAUNCHBAR=&Create desktop and quick launch shortcuts for $BrandShortName
-VERSION_32BIT=32-bit $BrandShortName
-VERSION_64BIT=64-bit $BrandShortName
-ARCH_DROPLIST_LABEL=&Version to install
+CREATE_SHORTCUTS=Create Shortcuts for $BrandShortName:
+ADD_SC_TASKBAR=On my &Task bar
+ADD_SC_QUICKLAUNCHBAR=On my &Quick Launch bar
+ADD_CheckboxShortcutInStartMenu=In my &Start Menu Programs Folder
+ADD_CheckboxShortcutOnDesktop=On my &Desktop
 SPACE_REQUIRED=Space Required:
 SPACE_AVAILABLE=Space Available:
 ONE_MOMENT_INSTALL=One moment, $BrandShortName will launch as soon as the install is complete…
 ONE_MOMENT_UPGRADE=One moment, $BrandShortName will launch as soon as the upgrade is complete…
 INSTALL_MAINT_SERVICE=&Install the $BrandShortName background update service
 SEND_PING=S&end information about this installation to Mozilla
 BROWSE_BUTTON=B&rowse…
 DEST_FOLDER=Destination Folder
--- a/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi
+++ b/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi
@@ -112,17 +112,20 @@ ShowUnInstDetails nevershow
 BrandingText " "
 
 Function .onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
 
   SetSilent silent
-  ${Unless} ${AtLeastWin7}
+  ; On Windows 2000 we do not install the maintenance service.
+  ; We won't run this installer from the parent installer, but just in case 
+  ; someone tries to execute it on Windows 2000...
+  ${Unless} ${AtLeastWinXP}
     Abort
   ${EndUnless}
 FunctionEnd
 
 Function un.onInit
   ; Remove the current exe directory from the search order.
   ; This only effects LoadLibrary calls and not implicitly loaded DLLs.
   System::Call 'kernel32::SetDllDirectoryW(w "")'
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -4939,25 +4939,56 @@
       ; SSE2 instruction set is available.
       System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R8"
       ${If} "$R8" == "0"
         MessageBox MB_OK|MB_ICONSTOP "$R9"
         ; Nothing initialized so no need to call OnEndCommon
         Quit
       ${EndIf}
 
-      ; Windows NT 6.0 (Vista/Server 2008) and lower are not supported.
-      ${Unless} ${AtLeastWin7}
-        MessageBox MB_OK|MB_ICONSTOP "$R9"
-        ; Nothing initialized so no need to call OnEndCommon
-        Quit
-      ${EndUnless}
-
       !ifdef HAVE_64BIT_BUILD
+        ${Unless} ${RunningX64}
+        ${OrUnless} ${AtLeastWin7}
+          MessageBox MB_OK|MB_ICONSTOP "$R9"
+          ; Nothing initialized so no need to call OnEndCommon
+          Quit
+        ${EndUnless}
+
         SetRegView 64
+      !else
+        StrCpy $R8 "0"
+        ${If} ${AtMostWin2000}
+          StrCpy $R8 "1"
+        ${EndIf}
+
+        ${If} ${IsWinXP}
+        ${AndIf} ${AtMostServicePack} 1
+          StrCpy $R8 "1"
+        ${EndIf}
+
+        ${If} $R8 == "1"
+          ; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
+          ; used to use for an unknown reason and likely fail the AtMostWin2000
+          ; and possibly the IsWinXP test as well. To work around this also
+          ; check if the Windows NT registry Key exists and if it does if the
+          ; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
+          ; 3.5.1), to 4 (Windows NT 4) or 5 (Windows 2000 and Windows XP).
+          StrCpy $R8 ""
+          ClearErrors
+          ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
+          StrCpy $R8 "$R8" 1
+          ${If} ${Errors}
+          ${OrIf} "$R8" == "3"
+          ${OrIf} "$R8" == "4"
+          ${OrIf} "$R8" == "5"
+            MessageBox MB_OK|MB_ICONSTOP "$R9"
+            ; Nothing initialized so no need to call OnEndCommon
+            Quit
+          ${EndIf}
+        ${EndUnless}
       !endif
 
       ${GetParameters} $R8
 
       ; Require elevation if the user can elevate
       ${ElevateUAC}
 
       ${If} $R8 != ""