Commands for installing tre-command 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 duan.tre -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id duan.tre -e --silentwinget uninstall --id duan.tre -e --silentBy installer
64-bit · MSI · en-US
Silent install
msiexec /i tre-v0.4.1-x86_64-pc-windows-msvc.msi /qn /norestartWrite a log
msiexec /i tre-v0.4.1-x86_64-pc-windows-msvc.msi /qn /norestart /l*v "%TEMP%\tre-command-install.log"Uninstall
msiexec /x {719C2B87-D777-41F4-841A-F2538C9F82A5} /qn /norestart- MSI product code
- {719C2B87-D777-41F4-841A-F2538C9F82A5}
- Uninstall registry key
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{719C2B87-D777-41F4-841A-F2538C9F82A5}
PowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-tre-command.ps1
$url = 'https://github.com/dduan/tre/releases/download/v0.4.0/tre-v0.4.1-x86_64-pc-windows-msvc.msi'
$sha256 = '154FF87E848CEFA8176E69CBF06318456CD782BC55BF067E18F385C226D268CF'
$file = Join-Path $env:TEMP 'tre-v0.4.1-x86_64-pc-windows-msvc.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' -Wait