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