Kommandon för att installera Certbot utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med winget
PowerShell
winget install --id EFF.Certbot -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id EFF.Certbot -e --silentwinget uninstall --id EFF.Certbot -e --silentPer installationsfil
64-bitars · EXE (NSIS) · Alla användare · en-US
Tyst installation
certbot-beta-installer-win_amd64_signed.exe /SEgen mapp
certbot-beta-installer-win_amd64_signed.exe /S /D=C:\Apps\certbotPowerShell: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
install-certbot.ps1
$url = 'https://github.com/certbot/certbot/releases/download/v2.9.0/certbot-beta-installer-win_amd64_signed.exe'
$sha256 = 'DA2D0647A0FE6B16A8E64DA09C210FBB382AEB93908322B299393B28846A419C'
$file = Join-Path $env:TEMP 'certbot-beta-installer-win_amd64_signed.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