Skip to content

Commit

Permalink
Add check for Visual C++ 2017 Redistributable files on host machine. F…
Browse files Browse the repository at this point in the history
…ixes #35
  • Loading branch information
codebrain committed Oct 19, 2018
1 parent cec2c15 commit 88fb230
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions installer/src/Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,32 @@ static void Main(string[] args)
Properties = new[]
{
new PropertyRef("NETFRAMEWORK40FULL"),

// Perform registry search for redist key
new Property("VS2017REDISTINSTALLED",
new RegistrySearch(RegistryHive.LocalMachine, @"SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64", "Installed", RegistrySearchType.raw){
Win64 = true
})
},
LaunchConditions = new List<LaunchCondition>
{
new LaunchCondition(
"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."
"This installer requires at least Windows 10 or Windows Server 2016."
),
new LaunchCondition(
"VS2017REDISTINSTALLED",
"This installer requires the Visual C++ 2017 Redistributable. " +
"Please install Visual C++ 2017 Redistributable and then run this installer again."
),
new LaunchCondition(
"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 and then run this installer again."
)
},

Expand Down

0 comments on commit 88fb230

Please sign in to comment.