Ordres per instal·lar Postgres Pro Standard 13 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 PostgresPro.Standard.13 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id PostgresPro.Standard.13 -e --silentwinget uninstall --id PostgresPro.Standard.13 -e --silentPer instal·lador
64 bits · EXE (NSIS) · Tots els usuaris · en-US
Instal·lació silenciosa
PostgreSQL_13.23_64bit_Setup.exe /SUna altra carpeta
PostgreSQL_13.23_64bit_Setup.exe /S /D=C:\Apps\postgres-pro-standard-13PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-postgres-pro-standard-13.ps1
$url = 'https://repo.postgrespro.ru/win/64/PostgreSQL_13.23_64bit_Setup.exe'
$sha256 = '123494381B0073E794B23388EC5549F5C98557616D7BAE3E87E87EFDEEF0ACBD'
$file = Join-Path $env:TEMP 'PostgreSQL_13.23_64bit_Setup.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S' -Wait