Příkazy pro instalaci programu hMailServer bez dotazů, jeho odinstalaci a detekci v nástrojích pro nasazení. Příkaz je uveden jen tehdy, když je přesně známý: z manifestu nebo ze zdokumentovaných parametrů technologie instalátoru.
Související návod: Parametry tiché instalace: MSI, NSIS, Inno Setup · Odinstalace programu přes registr nebo PowerShell
Přes winget
PowerShell
winget install --id hMailServer.hMailServer -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id hMailServer.hMailServer -e --silentwinget uninstall --id hMailServer.hMailServer -e --silentPodle instalátoru
64bit · EXE (Inno Setup) · Všichni uživatelé
Tichá instalace
hMailServer-5.7.2-B3164-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Vlastní složka
hMailServer-5.7.2-B3164-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\hmailserver"- Klíč odinstalace v registru
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\hMailServer_is1
- Instalační složka
- %ProgramFiles%\hMailServer
PowerShell: stáhnout, ověřit, nainstalovat
Stáhne oficiální soubor, ověří SHA256 a program nainstaluje v tichém režimu.
install-hmailserver.ps1
$url = 'https://github.com/hmailserver/hmailserver/releases/download/hMailServer-5.7.2-b3164/hMailServer-5.7.2-B3164-x64.exe'
$sha256 = '7AEBA848EFF2AF24BAEFD9F327BE54534C590B29D788CA85DC5206B7A692ED3F'
$file = Join-Path $env:TEMP 'hMailServer-5.7.2-B3164-x64.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait