2024-03-13 08:06:48 +00:00
|
|
|
#!/bin/pwsh
|
|
|
|
|
|
|
|
function Install-Winget {
|
2024-03-13 08:34:27 +00:00
|
|
|
$downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle";
|
|
|
|
$file = New-TemporaryFile;
|
2024-03-13 10:16:24 +00:00
|
|
|
$file = Rename-Item $file "$file.msixbundle" -PassThru;
|
2024-03-13 08:34:27 +00:00
|
|
|
Invoke-WebRequest "$downloadLink" -OutFile "$file";
|
2024-03-13 08:38:02 +00:00
|
|
|
choco install -y winget;
|
2024-03-13 08:34:27 +00:00
|
|
|
Add-AppxPackage "$file";
|
|
|
|
Remove-Item $file;
|
2024-03-13 08:06:48 +00:00
|
|
|
}
|