Skip to content

Commit

Permalink
Fix ArchWSL cert install
Browse files Browse the repository at this point in the history
- No manual steps required
  • Loading branch information
LeDragoX committed Jun 25, 2024
1 parent c1f2dd5 commit b4f0300
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/scripts/other-scripts/Install-ArchWSL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4f0300

Please sign in to comment.