Motionを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Nexusbird.Motion -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Nexusbird.Motion -e --silentwinget uninstall --id Nexusbird.Motion -e --silentインストーラー別
64ビット · MSIX
サイレントインストール
Add-AppxPackage -Path motion-0.117.0.x64.msixアンインストール
Get-AppxPackage -Name Motion | Remove-AppxPackagePowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-motion.ps1
$url = 'https://github.com/usemotion/desktopapp/releases/download/0.117.0/motion-0.117.0.x64.msix'
$sha256 = '1DE01458D983C8D0D460877F99F0D9CA7869B94361E8698D66336203BABA8F3D'
$file = Join-Path $env:TEMP 'motion-0.117.0.x64.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file