Spiceを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id ChilliBits.Spice -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ChilliBits.Spice -e --silentwinget uninstall --id ChilliBits.Spice -e --silentインストーラー別
64ビット · MSI · すべてのユーザー · en-US
サイレントインストール
msiexec /i spice_x64_setup.msi /qn /norestartログを出力
msiexec /i spice_x64_setup.msi /qn /norestart /l*v "%TEMP%\spice-install.log"アンインストール
msiexec /x {8A594C11-1C1D-4610-8C0C-4223C134F973} /qn /norestart- MSIプロダクトコード
- {8A594C11-1C1D-4610-8C0C-4223C134F973}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8A594C11-1C1D-4610-8C0C-4223C134F973}
- UpgradeCode
- {4A04A982-0FFC-4057-8FD1-507C6153567C}
- インストール先フォルダー
- %ProgramFiles(x86)%/Spice
- DisplayVersion
- 0.30.2
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-spice.ps1
$url = 'https://github.com/spicelang/spice/releases/download/0.30.2/spice_x64_setup.msi'
$sha256 = '6C8B19CD0995D0724F25246CBF21D96ED5B5980EF9E37E0898F8B71CC44CB2F0'
$file = Join-Path $env:TEMP 'spice_x64_setup.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait