# 1. Download the latest release binary directly from GitHub
$url = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
$outPath = "$env:TEMP\winget_latest.msixbundle"
Write-Host "--- Downloading Latest WinGet Binary ---" -ForegroundColor Cyan
Invoke-WebRequest -Uri $url -OutFile $outPath
# 2. Force the installation (This fixes the 'higher version already installed' conflict)
Write-Host "--- Forcing Package Overwrite ---" -ForegroundColor Cyan
Add-AppxPackage -Path $outPath -ForceUpdateFromAnyVersion -ForceApplicationShutdown
# 3. Clean and Reset Sources
Write-Host "--- Resetting Sources ---" -ForegroundColor Yellow
winget source reset --force
# 4. Final Update (This should now work without the argument error)
winget source update
No comments:
Post a Comment