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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user