Kaydet (Commit) d87fa557 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#122134: use CurrentMajorVersionNumber to filter out Windows 10

On Windows 8.1, the one that is problematic to tell from Windows 10
(because the latter also exposes its version as 603 to the msiexec),
the registry value doesn't exist at
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
but let's play safe and also check for "#6" value just in case.

Reference:
https://stackoverflow.com/questions/31072543/reliable-way-to-get-windows-version-from-registry

Thanks to Mitchell <blazer64@gmail.com> for the idea!

Change-Id: Ic907c4d992a7cb1d12e392686c19cd6fd6da3c7c
Reviewed-on: https://gerrit.libreoffice.org/65231Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 71762113
...@@ -6,3 +6,4 @@ INSTALLLOCATION installuser_ ...@@ -6,3 +6,4 @@ INSTALLLOCATION installuser_
INSTALLLOCATION installmachine INSTALLLOCATION installmachine
INSTALLLOCATION installmachine_ INSTALLLOCATION installmachine_
WIN81S14 win81s14 WIN81S14 win81s14
WINMAJORVER WinMajorVer
...@@ -43,7 +43,7 @@ ProgressType3 installs ...@@ -43,7 +43,7 @@ ProgressType3 installs
Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE
RebootYesNo Yes RebootYesNo Yes
ReinstallModeText omus ReinstallModeText omus
SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14 SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14;WINMAJORVER
SetupType Typical SetupType Typical
SELECT_WORD 0 SELECT_WORD 0
SELECT_EXCEL 0 SELECT_EXCEL 0
......
...@@ -5,3 +5,4 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] ...@@ -5,3 +5,4 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION]
installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine 2 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installmachine 2 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine_ 2 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installmachine_ 2 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
WinMajorVer 2 Software\Microsoft\Windows NT\CurrentVersion CurrentMajorVersionNumber 2
...@@ -114,7 +114,7 @@ WindowsCustomAction gid_Customaction_check_win81x64_ucrt ...@@ -114,7 +114,7 @@ WindowsCustomAction gid_Customaction_check_win81x64_ucrt
Source = "InstMSUBinary"; Source = "InstMSUBinary";
Target = "25000|Windows81-KB2999226-x64msu"; Target = "25000|Windows81-KB2999226-x64msu";
Inbinarytable = 0; Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And VersionNT64", "check_win8x64_ucrt"); Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And (Not WINMAJORVER Or WINMAJORVER = \"#6\") And VersionNT64", "check_win8x64_ucrt");
Styles = "NO_FILE"; Styles = "NO_FILE";
End End
...@@ -150,7 +150,7 @@ WindowsCustomAction gid_Customaction_check_win81x32_ucrt ...@@ -150,7 +150,7 @@ WindowsCustomAction gid_Customaction_check_win81x32_ucrt
Source = "InstMSUBinary"; Source = "InstMSUBinary";
Target = "25000|Windows81-KB2999226-x86msu"; Target = "25000|Windows81-KB2999226-x86msu";
Inbinarytable = 0; Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And Not VersionNT64", "check_win8x32_ucrt"); Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And (Not WINMAJORVER Or WINMAJORVER = \"#6\") And Not VersionNT64", "check_win8x32_ucrt");
Styles = "NO_FILE"; Styles = "NO_FILE";
End End
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment