Les commandes pour installer GnuWin32: DiffUtils sans aucune question, le désinstaller et le détecter depuis un outil de déploiement. Une commande n’apparaît que si elle est certaine : issue du manifeste ou valeur par défaut documentée de la technologie d’installation.
Guide associé: Installation silencieuse : MSI, NSIS, Inno Setup · Désinstaller un programme via le registre ou PowerShell
Avec winget
winget install --id GnuWin32.DiffUtils -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GnuWin32.DiffUtils -e --silentwinget uninstall --id GnuWin32.DiffUtils -e --silentPar installateur
32 bits · EXE (Inno Setup)
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnuwin32-diffutils"PowerShell : télécharger, vérifier, installer
Télécharge le fichier officiel, vérifie son empreinte SHA256 et l’installe en mode silencieux.
$url = 'https://sourceforge.net/projects/gnuwin32/files/diffutils/2.8.7-1/diffutils-2.8.7-1.exe/download'
$sha256 = '5DE7D06512DCBDE50BDB9BD6731332C3141515962CC69AFF9F7DA7A3F97BEF17'
$file = Join-Path $env:TEMP 'download'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait