Update Winget-AutoUpdate-Install.ps1

pull/56/head
Romain 2022-04-15 18:48:45 +02:00
parent 3448fb9ac9
commit 3ec6cb1fb2
1 changed files with 5 additions and 5 deletions

View File

@ -117,19 +117,19 @@ function Install-WinGet{
Else{ Else{
#Download WinGet MSIXBundle #Download WinGet MSIXBundle
Write-Host "Not installed. Downloading WinGet..." "Yellow" Write-Host "Not installed. Downloading WinGet..."
$WinGetURL = "https://aka.ms/getwinget" $WinGetURL = "https://aka.ms/getwinget"
$WebClient=New-Object System.Net.WebClient $WebClient=New-Object System.Net.WebClient
$WebClient.DownloadFile($WinGetURL, "$PSScriptRoot\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle") $WebClient.DownloadFile($WinGetURL, "$PSScriptRoot\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle")
#Install WinGet MSIXBundle #Install WinGet MSIXBundle
try{ try{
Write-Host "Installing MSIXBundle for App Installer..." "Yellow" Write-Host "Installing MSIXBundle for App Installer..."
Add-AppxProvisionedPackage -Online -PackagePath "$PSScriptRoot\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath "$PSScriptRoot\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -SkipLicense
Write-Host "Installed MSIXBundle for App Installer" "Green" Write-Host "Installed MSIXBundle for App Installer" -ForegroundColor Green
} }
catch{ catch{
Write-Host "Failed to intall MSIXBundle for App Installer..." "Red" Write-Host "Failed to intall MSIXBundle for App Installer..." -ForegroundColor Red
} }
#Remove WinGet MSIXBundle #Remove WinGet MSIXBundle