Commando’s om GnuWin32: DiffUtils zonder vragen te installeren, weer te verwijderen en te detecteren in uitroltools. Een commando staat er alleen als het vaststaat: uit het manifest of als gedocumenteerde standaard van de installertechniek.
Gerelateerde handleiding: Stille installatie-parameters: MSI, NSIS, Inno Setup · Programma verwijderen via register of PowerShell
Met winget
PowerShell
winget install --id GnuWin32.DiffUtils -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GnuWin32.DiffUtils -e --silentwinget uninstall --id GnuWin32.DiffUtils -e --silentPer installer
32-bits · EXE (Inno Setup)
Stille installatie
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Andere map
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnuwin32-diffutils"PowerShell: downloaden, controleren, installeren
Downloadt het officiële bestand, controleert de SHA256-hash en installeert stil.
install-gnuwin32-diffutils.ps1
$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