BestNotesを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id BestNotes.BestNotes -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id BestNotes.BestNotes -e --silentwinget uninstall --id BestNotes.BestNotes -e --silentインストーラー別
64ビット · EXE(NSIS)
サイレントインストール
BestNotes-3.6.0-Installer.exe /Sインストール先を指定
BestNotes-3.6.0-Installer.exe /S /D=C:\Apps\bestnotes- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\087a0f55-7340-5500-87e1-3b46c43cc73d
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-bestnotes.ps1
$url = 'https://updates.bestnotes.com/3.6.0/BestNotes-3.6.0-Installer.exe'
$sha256 = '85376D10C16E8B6F0387D0C12E49A3F51C75190F61BDE819ACC93AD94A9BBCB6'
$file = Join-Path $env:TEMP 'BestNotes-3.6.0-Installer.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