From b4f03002220fd6bea9ceab97c78c73f294f1f685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=ADnio=20Larrubia?= Date: Tue, 25 Jun 2024 09:43:39 -0300 Subject: [PATCH] Fix ArchWSL cert install - No manual steps required --- src/scripts/other-scripts/Install-ArchWSL.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/scripts/other-scripts/Install-ArchWSL.ps1 b/src/scripts/other-scripts/Install-ArchWSL.ps1 index 923cffb7..aac6e720 100644 --- a/src/scripts/other-scripts/Install-ArchWSL.ps1 +++ b/src/scripts/other-scripts/Install-ArchWSL.ps1 @@ -10,10 +10,7 @@ function Install-ArchWSL() { If ($OSArch -like "x64") { $CertOutput = Get-APIFile -URI "https://api.github.com/repos/yuk7/ArchWSL/releases/latest" -ObjectProperty "assets" -FileNameLike "ArchWSL-AppX_*_$OSArch.cer" -PropertyValue "browser_download_url" -OutputFile "ArchWSL.cer" Write-Status -Types "+" -Status "Installing ArchWSL Certificate ($OSArch)..." - Import-Certificate -FilePath $CertOutput -CertStoreLocation Cert:\LocalMachine\Root | Out-Host - Write-Status -Types "?" -Status "The certificate needs to be installed manually, the cmdlet didn't work for some reason..." -Warning - Write-Status -Types "@" -Status "Steps: Install Certificate... (Next) > Select Local Machine (Next) > Next > Finish > OK" -Warning - Start-Process -FilePath "$CertOutput" -Wait + certutil.exe -addstore "Root" $CertOutput | Out-Host $ArchWSLOutput = Get-APIFile -URI "https://api.github.com/repos/yuk7/ArchWSL/releases/latest" -ObjectProperty "assets" -FileNameLike "ArchWSL-AppX_*_$OSArch.appx" -PropertyValue "browser_download_url" -OutputFile "ArchWSL.appx" Write-Status -Types "+" -Status "Installing ArchWSL ($OSArch)..." Add-AppxPackage -Path $ArchWSLOutput