imaを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Tencent.ima-copilot -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Tencent.ima-copilot -e --silentwinget uninstall --id Tencent.ima-copilot -e --silentインストーラー別
64ビット · EXE
サイレントインストール
ima.copilot_win_x64_1018_2.6.13_5247.exe quiet- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ima.copilot
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-ima.ps1
$url = 'https://app-dl.ima.qq.com/win_channel/ima.copilot_win_x64_1018_2.6.13_5247.exe'
$sha256 = '8B4643BE015AD50479415D724695B269EE406F8908970347141558950706D6B8'
$file = Join-Path $env:TEMP 'ima.copilot_win_x64_1018_2.6.13_5247.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 'quiet' -Wait