ml-playerを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id MarcoML.ml-player -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id MarcoML.ml-player -e --silentwinget uninstall --id MarcoML.ml-player -e --silentインストーラー別
64ビット · EXE(Inno Setup)
サイレントインストール
ml-player-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-インストール先を指定
ml-player-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\ml-player"PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-ml-player.ps1
$url = 'https://github.com/marcomolinaleija/ml-player-releases/releases/download/installer-3.8.6/ml-player-setup.exe'
$sha256 = 'BF25582F559619D55D1B491FADA9463F7F6D96C138C400FDA15508685BB4484C'
$file = Join-Path $env:TEMP 'ml-player-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