Install XAML before installing winget
This commit is contained in:
parent
f9abc3801a
commit
2cfe755334
1 changed files with 3 additions and 1 deletions
|
@ -1,11 +1,13 @@
|
||||||
#!/bin/pwsh
|
#!/bin/pwsh
|
||||||
|
|
||||||
function Install-Winget {
|
function Install-Winget {
|
||||||
|
$xamlDownloadLink = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx";
|
||||||
$downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle";
|
$downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle";
|
||||||
$file = New-TemporaryFile;
|
$file = New-TemporaryFile;
|
||||||
$file = Rename-Item $file "$file.msixbundle" -PassThru;
|
$file = Rename-Item $file "$file.msixbundle" -PassThru;
|
||||||
|
Invoke-WebRequest "$xamlDownloadLink" -OutFile "$file";
|
||||||
|
Add-AppxPackage "$file";
|
||||||
Invoke-WebRequest "$downloadLink" -OutFile "$file";
|
Invoke-WebRequest "$downloadLink" -OutFile "$file";
|
||||||
choco install -y winget;
|
|
||||||
Add-AppxPackage "$file";
|
Add-AppxPackage "$file";
|
||||||
Remove-Item $file;
|
Remove-Item $file;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue