Skip to content

Commit 2958e21

Browse files
committed
fix restributable check
1 parent 0d227b4 commit 2958e21

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

SimpleDnsCrypt/Helper/PrerequisiteHelper.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ public static bool IsRedistributablePackageInstalled()
2222
{
2323
//check for 2015 - 2019
2424
var parametersVc2015to2019x64 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum", false);
25-
if (parametersVc2015to2019x64 == null) return false;
26-
var vc2015to2019x64Version = parametersVc2015to2019x64.GetValue("Version");
27-
if (((string)vc2015to2019x64Version).StartsWith("14"))
25+
if (parametersVc2015to2019x64 != null)
2826
{
29-
return true;
27+
var vc2015to2019x64Version = parametersVc2015to2019x64.GetValue("Version");
28+
if (((string)vc2015to2019x64Version).StartsWith("14"))
29+
{
30+
return true;
31+
}
3032
}
3133
//check for 2017
3234
var paths2017X64 = new List<string>
@@ -50,11 +52,13 @@ public static bool IsRedistributablePackageInstalled()
5052
{
5153
//check for 2015 - 2019
5254
var parametersVc2015to2019x86 = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum", false);
53-
if (parametersVc2015to2019x86 == null) return false;
54-
var vc2015to2019x86Version = parametersVc2015to2019x86.GetValue("Version");
55-
if (((string)vc2015to2019x86Version).StartsWith("14"))
55+
if (parametersVc2015to2019x86 != null)
5656
{
57-
return true;
57+
var vc2015to2019x86Version = parametersVc2015to2019x86.GetValue("Version");
58+
if (((string)vc2015to2019x86Version).StartsWith("14"))
59+
{
60+
return true;
61+
}
5862
}
5963
//check for 2017
6064
var paths2017X86 = new List<string>

0 commit comments

Comments
 (0)