Commands for installing hMailServer without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With 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 --silentBy installer
64-bit · EXE (Inno Setup) · All users
Silent install
hMailServer-5.7.2-B3164-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Custom folder
hMailServer-5.7.2-B3164-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\hmailserver"- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\hMailServer_is1
- Install folder
- %ProgramFiles%\hMailServer
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
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