Run install script even if there is no archive for redistributables

This commit is contained in:
Pat Hartl 2023-10-28 14:08:13 -05:00
parent b23df9b2ad
commit 5a99f58f81

View file

@ -230,6 +230,8 @@ namespace LANCommander.PlaynitePlugin
// Redistributable is not installed // Redistributable is not installed
if (detectionResult == 0) if (detectionResult == 0)
{
if (redistributable.Archives.Count() > 0)
{ {
var extractionResult = DownloadAndExtractRedistributable(redistributable); var extractionResult = DownloadAndExtractRedistributable(redistributable);
@ -240,6 +242,11 @@ namespace LANCommander.PlaynitePlugin
PowerShellRuntime.RunScript(installScriptTempFile, installScript.RequiresAdmin, null, extractTempPath); PowerShellRuntime.RunScript(installScriptTempFile, installScript.RequiresAdmin, null, extractTempPath);
} }
} }
else
{
PowerShellRuntime.RunScript(installScriptTempFile, installScript.RequiresAdmin, null, extractTempPath);
}
}
} }
catch (Exception ex) catch (Exception ex)
{ {