Run install script even if there is no archive for redistributables

media
Pat Hartl 2023-10-28 14:08:13 -05:00
parent b23df9b2ad
commit 5a99f58f81
1 changed files with 11 additions and 4 deletions

View File

@ -231,12 +231,19 @@ namespace LANCommander.PlaynitePlugin
// Redistributable is not installed
if (detectionResult == 0)
{
var extractionResult = DownloadAndExtractRedistributable(redistributable);
if (extractionResult.Success)
if (redistributable.Archives.Count() > 0)
{
extractTempPath = extractionResult.Directory;
var extractionResult = DownloadAndExtractRedistributable(redistributable);
if (extractionResult.Success)
{
extractTempPath = extractionResult.Directory;
PowerShellRuntime.RunScript(installScriptTempFile, installScript.RequiresAdmin, null, extractTempPath);
}
}
else
{
PowerShellRuntime.RunScript(installScriptTempFile, installScript.RequiresAdmin, null, extractTempPath);
}
}