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