MTPuTTYを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id TTYPlus.MTPuTTY -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TTYPlus.MTPuTTY -e --silentwinget uninstall --id TTYPlus.MTPuTTY -e --silentインストーラー別
32ビット · EXE(Inno Setup) · 現在のユーザー
サイレントインストール
mtputty_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
mtputty_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\mtputty"- アンインストール用レジストリキー
- HKCU\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MTPuTTY_is1
32ビット · EXE(Inno Setup) · すべてのユーザー
サイレントインストール
mtputty_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
mtputty_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\mtputty"- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MTPuTTY_is1
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-mtputty.ps1
$url = 'https://ttyplus.com/download/mtputty_setup.exe'
$sha256 = 'C5B9AFAD75DDD8C527503AC3B4D7A97920081C254C54044DF421BD05145AE163'
$file = Join-Path $env:TEMP 'mtputty_setup.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-mtputty.ps1
$url = 'https://ttyplus.com/download/mtputty_setup.exe'
$sha256 = 'C5B9AFAD75DDD8C527503AC3B4D7A97920081C254C54044DF421BD05145AE163'
$file = Join-Path $env:TEMP 'mtputty_setup.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