BaoCut (CPU)を確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id JimLiu.BaoCut.CPU -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id JimLiu.BaoCut.CPU -e --silentwinget uninstall --id JimLiu.BaoCut.CPU -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
BaoCut-3.19.2-build.97-win-x64-setup.exe /Sインストール先を指定
BaoCut-3.19.2-build.97-win-x64-setup.exe /S /D=C:\Apps\baocut-cpu- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\4ba17ed6-f813-5ceb-a0ad-3bebdcd84846
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-baocut-cpu.ps1
$url = 'https://github.com/JimLiu/baocut/releases/download/baocut-v3.19.2-build.97/BaoCut-3.19.2-build.97-win-x64-setup.exe'
$sha256 = '80B0E5F17F6704F53E9BDFCC7FA0C7B7DDAFB7A81936BC37D19522C6BBB91126'
$file = Join-Path $env:TEMP 'BaoCut-3.19.2-build.97-win-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