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