GhostPenを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Highercomve.GhostPen -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Highercomve.GhostPen -e --silentwinget uninstall --id Highercomve.GhostPen -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
ghostpen-0.2.12-setup.exe /Sインストール先を指定
ghostpen-0.2.12-setup.exe /S /D=C:\Apps\ghostpen- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\dev.ghostpen.Oriel
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-ghostpen.ps1
$url = 'https://github.com/highercomve/GhostPen/releases/download/v0.2.12/ghostpen-0.2.12-setup.exe'
$sha256 = 'D097EDAB485B76CC413C5D3937785E1A98CAB199C3F7ED091F1316DE3905AD46'
$file = Join-Path $env:TEMP 'ghostpen-0.2.12-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 '/S' -Wait