Comateを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Baidu.Comate -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Baidu.Comate -e --silentwinget uninstall --id Baidu.Comate -e --silentインストーラー別
64ビット · EXE(Inno Setup) · 現在のユーザー
サイレントインストール
Comate-win32-x64-user-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
Comate-win32-x64-user-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\comate"- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E1BCCBB0-0C31-40C1-AB8D-2AE2E6C3C2F2}}_is1
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-comate.ps1
$url = 'https://comate-ide.cdn.bcebos.com/download/stable/b0a3898a5a5ca92be2dc09a8bb0f91d341925e3a-273608800/Comate-win32-x64-user-setup.exe'
$sha256 = 'DB460A6AF777FE4DD5D0607F870137A8F312353F16CDC97991F3A902EB4460C8'
$file = Join-Path $env:TEMP 'Comate-win32-x64-user-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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait