TheBrainを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id TheBrain.TheBrain -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TheBrain.TheBrain -e --silentwinget uninstall --id TheBrain.TheBrain -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
TheBrain-15.0.647-x64-Setup.exe /Sインストール先を指定
TheBrain-15.0.647-x64-Setup.exe /S /D=C:\Apps\thebrain- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\392aefa7-e3c1-510d-99ca-500f7a312b9b
64ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
TheBrain-15.0.647-x64-Setup.exe /Sインストール先を指定
TheBrain-15.0.647-x64-Setup.exe /S /D=C:\Apps\thebrain- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\392aefa7-e3c1-510d-99ca-500f7a312b9b
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-thebrain.ps1
$url = 'https://updater.thebrain.com/files/TheBrain-15.0.647-x64-Setup.exe'
$sha256 = 'DB66B062BAE0003E897AA97DA65381ED2BE53A43C18F51924FAA3071631B7AE8'
$file = Join-Path $env:TEMP 'TheBrain-15.0.647-x64-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 install-thebrain.ps1
$url = 'https://updater.thebrain.com/files/TheBrain-15.0.647-x64-Setup.exe'
$sha256 = 'DB66B062BAE0003E897AA97DA65381ED2BE53A43C18F51924FAA3071631B7AE8'
$file = Join-Path $env:TEMP 'TheBrain-15.0.647-x64-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