ADInstruments Spirometryを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id ADInstruments.LabChart.Extension.Spirometry -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ADInstruments.LabChart.Extension.Spirometry -e --silentwinget uninstall --id ADInstruments.LabChart.Extension.Spirometry -e --silentインストーラー別
32ビット · MSI · すべてのユーザー
サイレントインストール
msiexec /i Spirometry_v2.5.3.msi /qn /norestartログを出力
msiexec /i Spirometry_v2.5.3.msi /qn /norestart /l*v "%TEMP%\adinstruments-spirometry-install.log"アンインストール
msiexec /x {9E78357C-CC52-4BC7-80A6-B9B7EC0DB706} /qn /norestart- MSIプロダクトコード
- {9E78357C-CC52-4BC7-80A6-B9B7EC0DB706}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9E78357C-CC52-4BC7-80A6-B9B7EC0DB706}
- UpgradeCode
- {30082DD5-C264-41FF-8FBF-C0EFFCA73468}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-adinstruments-spirometry.ps1
$url = 'https://cdn.adinstruments.com/Installers/win/Spirometry_v2.5.3.msi'
$sha256 = '5FAF51AFF7250910EC30AFE5DD65548BBF0E3D5F87F40AC2B1DAED77331F461B'
$file = Join-Path $env:TEMP 'Spirometry_v2.5.3.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