From cec2c15b367e9f4d6c127237e2cf15f1ed3786b6 Mon Sep 17 00:00:00 2001 From: Stuart Cam Date: Thu, 18 Oct 2018 22:28:56 +0100 Subject: [PATCH] Add launch condition check to only allow installations on Windows 10 or Windows Server 2016. Fixes #34 --- installer/src/Installer/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/installer/src/Installer/Program.cs b/installer/src/Installer/Program.cs index 314be44c..ea7224e8 100644 --- a/installer/src/Installer/Program.cs +++ b/installer/src/Installer/Program.cs @@ -71,7 +71,6 @@ static void Main(string[] args) HelpLink = "https://discuss.elastic.co/c/elasticsearch" }, OutFileName = msiFileName, - Properties = new[] { new PropertyRef("NETFRAMEWORK40FULL"), @@ -82,6 +81,14 @@ static void Main(string[] args) "Installed OR NETFRAMEWORK40FULL", "This installer requires at least .NET Framework 4.0 in order to run the configuration editor. " + "Please install .NET Framework 4.0 then run this installer again." + ), + /* + Windows 10: VersionNT64 = 1000 AND MsiNTProductType = 1 + Windows Server 2016: VersionNT64 = 1000 AND MsiNTProductType <> 1 + */ + new LaunchCondition( + "NOT ((VersionNT64 = 1000 AND MsiNTProductType = 1) OR (VersionNT64 = 1000 AND MsiNTProductType <> 1))", + "This installer requires at least Windows 10 or Windows Server 2016." ) },