Barcode2WinProを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Paludour.Barcode2WinPro -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Paludour.Barcode2WinPro -e --silentwinget uninstall --id Paludour.Barcode2WinPro -e --silentインストーラー別
64ビット · EXE(WiX Burn)
サイレントインストール
Barcode2WinPro2.0-x64.exe /quiet /norestartPowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-barcode2winpro.ps1
$url = 'https://www.paludour.net/Barcode2WinPro2.0-x64.exe'
$sha256 = 'C148A54C82089C815467BA4FB4607DD5EEC54E212B1302A0EC074018ECE6C690'
$file = Join-Path $env:TEMP 'Barcode2WinPro2.0-x64.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 '/quiet /norestart' -Wait