Skip to content

Commit

Permalink
Add launch condition check to only allow installations on Windows 10 …
Browse files Browse the repository at this point in the history
…or Windows Server 2016. Fixes #34
  • Loading branch information
codebrain committed Oct 18, 2018
1 parent 26c86b9 commit cec2c15
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion installer/src/Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ static void Main(string[] args)
HelpLink = "https://discuss.elastic.co/c/elasticsearch"
},
OutFileName = msiFileName,

Properties = new[]
{
new PropertyRef("NETFRAMEWORK40FULL"),
Expand All @@ -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."
)
},

Expand Down

0 comments on commit cec2c15

Please sign in to comment.