From d6234fb6af628cd7ae673771dec8e95ed8d2bbad Mon Sep 17 00:00:00 2001 From: freddydk Date: Mon, 28 Nov 2022 05:43:11 +0100 Subject: [PATCH 1/2] Issue #2793 --- CreateScript.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CreateScript.ps1 b/CreateScript.ps1 index c8812f60d..41b1b3334 100644 --- a/CreateScript.ps1 +++ b/CreateScript.ps1 @@ -1224,7 +1224,15 @@ $Step.Isolation { try { $bestContainerOS = "The image, which matches your host OS best is $($bestContainerOsVersion.ToString())" - if ($hostOsVersion.Major -eq $bestContainerOsVersion.Major -and $hostOsVersion.Minor -eq $bestContainerOsVersion.Minor -and $hostOsVersion.Build -eq $bestContainerOsVersion.Build) { + if ($hostOsVersion.Build -ge 20348 -and $bestContainerOsVersion.Build -ge 20348) { + if ($bestContainerOsVersion -le $hostOsVersion) { + $defaultIsolation = "process" + } + else { + $defaultIsolation = "Hyper-V" + } + } + elseif ($hostOsVersion.Major -eq $bestContainerOsVersion.Major -and $hostOsVersion.Minor -eq $bestContainerOsVersion.Minor -and $hostOsVersion.Build -eq $bestContainerOsVersion.Build) { $defaultIsolation = "Process" } else { From b0ac8655eae0b581d4484cec5185e1fb409fe2bc Mon Sep 17 00:00:00 2001 From: freddydk Date: Tue, 29 Nov 2022 17:03:48 +0100 Subject: [PATCH 2/2] issue #307 --- AppHandling/Sign-NavContainerApp.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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")) {