From 47b8c58d47bae45d723ef22665e8f13ecc66725f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 18 Feb 2018 13:12:13 +0100 Subject: Prevent installing stand-alone installers on unsupported environments. - Prevent installers from installing on XP/Vista. - Prevent x64 installers from installing on x86. --- toolkit/mozapps/installer/windows/nsis/common.nsh | 45 ++++------------------- 1 file changed, 7 insertions(+), 38 deletions(-) (limited to 'toolkit/mozapps') diff --git a/toolkit/mozapps/installer/windows/nsis/common.nsh b/toolkit/mozapps/installer/windows/nsis/common.nsh index ac7607449..846718dab 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 -- cgit v1.2.3