VisitReportを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id snapADDY.VisitReport -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id snapADDY.VisitReport -e --silentwinget uninstall --id snapADDY.VisitReport -e --silentインストーラー別
64ビット · EXE(NSIS)
サイレントインストール
"snapAddy VisitReport Setup.exe" /Sインストール先を指定
"snapAddy VisitReport Setup.exe" /S /D=C:\Apps\visitreport- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\9047691b-1a19-582d-9d32-dceb4bb50bbd
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-visitreport.ps1
$url = 'https://downloads.snapaddy.com/visitreport/windows/snapAddy%20VisitReport%20Setup.exe'
$sha256 = '0F2856212977EB54CB0B81E3C3EC4FF60A77A2E138C9D4735403392BDAFDC325'
$file = Join-Path $env:TEMP 'snapAddy VisitReport 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