cosbrowserを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Tencent.COSBrowser -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Tencent.COSBrowser -e --silentwinget uninstall --id Tencent.COSBrowser -e --silentインストーラー別
64ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
cosbrowser-setup-2.13.1.exe /Sインストール先を指定
cosbrowser-setup-2.13.1.exe /S /D=C:\Apps\cosbrowser- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1eba6458-8298-5f4a-b899-8235107f65a2
32ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
cosbrowser-setup-2.13.1.exe /Sインストール先を指定
cosbrowser-setup-2.13.1.exe /S /D=C:\Apps\cosbrowser- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\1eba6458-8298-5f4a-b899-8235107f65a2
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-cosbrowser.ps1
$url = 'https://cos5.cloud.tencent.com/cosbrowser/cosbrowser-setup-2.13.1.exe'
$sha256 = 'CC74B73F3AE8AFF66DC61179043639BCA1778DE026B6E9B2165280E8641980A7'
$file = Join-Path $env:TEMP 'cosbrowser-setup-2.13.1.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-cosbrowser.ps1
$url = 'https://cos5.cloud.tencent.com/cosbrowser/cosbrowser-setup-2.13.1.exe'
$sha256 = 'CC74B73F3AE8AFF66DC61179043639BCA1778DE026B6E9B2165280E8641980A7'
$file = Join-Path $env:TEMP 'cosbrowser-setup-2.13.1.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