Update Winget-AutoUpdate-Install.ps1
parent
3448fb9ac9
commit
3ec6cb1fb2
|
@ -115,21 +115,21 @@ 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
|
||||||
|
|
Loading…
Reference in New Issue