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