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