diff --git a/AppHandling/Sign-NavContainerApp.ps1 b/AppHandling/Sign-NavContainerApp.ps1 index 9d47333c8..1d0386837 100644 --- a/AppHandling/Sign-NavContainerApp.ps1 +++ b/AppHandling/Sign-NavContainerApp.ps1 @@ -89,7 +89,15 @@ try { Write-Host "Downloading Signing Tools" $winSdkSetupExe = "c:\run\install\winsdksetup.exe" $winSdkSetupUrl = "https://go.microsoft.com/fwlink/p/?LinkID=2023014" - (New-Object System.Net.WebClient).DownloadFile($winSdkSetupUrl, $winSdkSetupExe) + try { + Invoke-WebRequest -UseBasicParsing -Uri $winSdkSetupUrl -OutFile $winSdkSetupExe + } + catch { + Write-Host (GetExtendedErrorMessage -errorRecord $_) + Start-Sleep -Seconds 5 + Write-Host "Retrying..." + Invoke-WebRequest -UseBasicParsing -Uri $winSdkSetupUrl -OutFile $winSdkSetupExe + } Write-Host "Installing Signing Tools" Start-Process $winSdkSetupExe -ArgumentList "/features OptionId.SigningTools /q" -Wait if (!(Test-Path "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\SignTool.exe")) {