Ordres per instal·lar gnuplot sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id gnuplot.gnuplot -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id gnuplot.gnuplot -e --silentwinget uninstall --id gnuplot.gnuplot -e --silentPer instal·lador
64 bits · EXE (Inno Setup) · Tots els usuaris · en-US
Instal·lació silenciosa
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
download /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\gnuplot"- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AB419AC3-9BC1-4EC5-A75B-4D8870DD651F}_is1
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-gnuplot.ps1
$url = 'https://sourceforge.net/projects/gnuplot/files/gnuplot/6.0.4/gp604-win64-clang.exe/download'
$sha256 = '2C31E3FC91B21C450F4B015F1CD1F2F84F7A8CFC63AFC037F9BA5EFB47CC0C23'
$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