From 0071e3697d0f9c6bb425c610c81bf78b44a813dd Mon Sep 17 00:00:00 2001 From: Olivier Date: Sun, 24 May 2026 11:20:33 +0200 Subject: [PATCH] Add --source winget to all remaining winget install and uninstall calls Co-Authored-By: Claude Sonnet 4.6 --- powershell/Winget-Remove-BuiltInApps.ps1 | 2 +- powershell/libres-softwares-install.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/powershell/Winget-Remove-BuiltInApps.ps1 b/powershell/Winget-Remove-BuiltInApps.ps1 index 4dd6c45..900f3b6 100644 --- a/powershell/Winget-Remove-BuiltInApps.ps1 +++ b/powershell/Winget-Remove-BuiltInApps.ps1 @@ -90,7 +90,7 @@ $Packages = @( foreach ($Package in $Packages) { Write-Host "Uninstalling: $Package" -ForegroundColor Cyan - winget uninstall --name "$Package" --silent --accept-source-agreements --nowarn + winget uninstall --name "$Package" --source winget --silent --accept-source-agreements --nowarn if ($LASTEXITCODE -eq 0) { Write-Host "$Package successfully uninstalled" -ForegroundColor Green diff --git a/powershell/libres-softwares-install.ps1 b/powershell/libres-softwares-install.ps1 index 7724be0..108cfec 100644 --- a/powershell/libres-softwares-install.ps1 +++ b/powershell/libres-softwares-install.ps1 @@ -429,7 +429,7 @@ foreach ($logiciel in $logicielsAInstaller) { $reussites++ $resultats += @{Logiciel = $logiciel.Nom; Statut = "Succes"} } else { - $process = Start-Process -FilePath "winget" -ArgumentList "install", "--id", $logiciel.ID, "--silent", "--accept-source-agreements", "--accept-package-agreements" -NoNewWindow -Wait -PassThru + $process = Start-Process -FilePath "winget" -ArgumentList "install", "--id", $logiciel.ID, "--source", "winget", "--silent", "--accept-source-agreements", "--accept-package-agreements" -NoNewWindow -Wait -PassThru if ($process.ExitCode -eq 0) { Write-Host "OK $($logiciel.Nom) installe avec succes" -ForegroundColor Green