Commands for installing VeraCrypt 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 IDRIX.VeraCrypt -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id IDRIX.VeraCrypt -e --silentwinget uninstall --id IDRIX.VeraCrypt -e --silentBy installer
64-bit · MSI · All users · en-US
Silent install
msiexec /i VeraCrypt_Setup_x64_1.26.29.msi /qn /norestart /qn ACCEPTLICENSE=YESWrite a log
msiexec /i VeraCrypt_Setup_x64_1.26.29.msi /qn /norestart /qn ACCEPTLICENSE=YES /l*v "%TEMP%\veracrypt-install.log"Uninstall
msiexec /x {0F25FB8F-24DC-418E-8E5D-015D9CB5F4C0} /qn /norestart- MSI product code
- {0F25FB8F-24DC-418E-8E5D-015D9CB5F4C0}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0F25FB8F-24DC-418E-8E5D-015D9CB5F4C0}
- UpgradeCode
- {298F5D2B-3B01-4A13-BEFD-4B3C7BE43BC6}
- Install folder
- %ProgramFiles%\VeraCrypt
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-veracrypt.ps1
$url = 'https://launchpad.net/veracrypt/trunk/1.26.29/+download/VeraCrypt_Setup_x64_1.26.29.msi'
$sha256 = '5BA6426983123CFB92BC1F09BD888FDBC0F53F300D0D9C5DA52CE3AEE8D474F0'
$file = Join-Path $env:TEMP 'VeraCrypt_Setup_x64_1.26.29.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart', '/qn ACCEPTLICENSE=YES' -Wait