免互動安裝Tera Term、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id TeraTermProject.teraterm -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TeraTermProject.teraterm -e --silentwinget uninstall --id TeraTermProject.teraterm -e --silent依安裝檔
32位元 · EXE(Inno Setup) · 僅目前使用者 · en-US
靜默安裝
teraterm-5.7.1-x86.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
teraterm-5.7.1-x86.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\tera-term"- 解除安裝登錄機碼
- HKCU\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{07A7E17A-F6D6-44A7-82E6-6BEE528CCA2A}_is1
- 安裝資料夾
- %LocalAppData%\Programs\teraterm5
- DisplayVersion
- 5.7.1
32位元 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
teraterm-5.7.1-x86.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
teraterm-5.7.1-x86.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\tera-term"- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{07A7E17A-F6D6-44A7-82E6-6BEE528CCA2A}_is1
- 安裝資料夾
- %ProgramFiles%\teraterm5
- DisplayVersion
- 5.7.1
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-tera-term.ps1
$url = 'https://github.com/TeraTermProject/teraterm/releases/download/v5.7.1/teraterm-5.7.1-x86.exe'
$sha256 = '88BF481C67E9DE7037A5E986E9F5F860F8C70832B456E936CAC6C593FDD37950'
$file = Join-Path $env:TEMP 'teraterm-5.7.1-x86.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 install-tera-term.ps1
$url = 'https://github.com/TeraTermProject/teraterm/releases/download/v5.7.1/teraterm-5.7.1-x86.exe'
$sha256 = '88BF481C67E9DE7037A5E986E9F5F860F8C70832B456E936CAC6C593FDD37950'
$file = Join-Path $env:TEMP 'teraterm-5.7.1-x86.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