Add --source winget to all remaining winget install and uninstall calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-24 11:20:33 +02:00
parent 956eddc872
commit 0071e3697d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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