diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-18 13:12:13 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-18 13:12:13 +0100 |
commit | 47b8c58d47bae45d723ef22665e8f13ecc66725f (patch) | |
tree | cf7047b8acb02ac5082f474e29fdc87ae79e36a5 /toolkit | |
parent | b6c330e1ca4baff6c98bfa94b8c3855d5afbc7cb (diff) | |
download | uxp-47b8c58d47bae45d723ef22665e8f13ecc66725f.tar.gz |
Prevent installing stand-alone installers on unsupported environments.
- Prevent installers from installing on XP/Vista.
- Prevent x64 installers from installing on x86.
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi | 5 | ||||
-rwxr-xr-x | toolkit/mozapps/installer/windows/nsis/common.nsh | 45 |
2 files changed, 8 insertions, 42 deletions
diff --git a/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi b/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi index 9e831dc9c7..d4d21e3777 100644 --- a/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi +++ b/toolkit/components/maintenanceservice/bootstrapinstaller/maintenanceservice_installer.nsi @@ -117,10 +117,7 @@ Function .onInit System::Call 'kernel32::SetDllDirectoryW(w "")' SetSilent silent - ; 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} + ${Unless} ${AtLeastWin7} Abort ${EndUnless} FunctionEnd diff --git a/toolkit/mozapps/installer/windows/nsis/common.nsh b/toolkit/mozapps/installer/windows/nsis/common.nsh index ac7607449d..846718dabd 100755 --- a/toolkit/mozapps/installer/windows/nsis/common.nsh +++ b/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -5107,46 +5107,15 @@ Quit ${EndIf} - !ifdef HAVE_64BIT_BUILD - ${Unless} ${RunningX64} - ${OrUnless} ${AtLeastWin7} - MessageBox MB_OK|MB_ICONSTOP "$R9" - ; Nothing initialized so no need to call OnEndCommon - Quit - ${EndUnless} + ; 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 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 |