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