Second Deskを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Ryanisgood.SecondDesk -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Ryanisgood.SecondDesk -e --silentwinget uninstall --id Ryanisgood.SecondDesk -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
SecondDesk-v1.3.3-Windows-Setup.exe /Sインストール先を指定
SecondDesk-v1.3.3-Windows-Setup.exe /S /D=C:\Apps\second-desk- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Second Desk
64ビット · MSI · すべてのユーザー
サイレントインストール
msiexec /i SecondDesk-v1.3.3-Windows.msi /qn /norestartログを出力
msiexec /i SecondDesk-v1.3.3-Windows.msi /qn /norestart /l*v "%TEMP%\second-desk-install.log"アンインストール
msiexec /x {680A4F7E-4A5B-4AB1-9A3B-90869CE1D150} /qn /norestart- MSIプロダクトコード
- {680A4F7E-4A5B-4AB1-9A3B-90869CE1D150}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{680A4F7E-4A5B-4AB1-9A3B-90869CE1D150}
- UpgradeCode
- {1F4FB4E3-59D7-52F0-A521-9B5EE2A36837}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-second-desk.ps1
$url = 'https://github.com/Ryanisgood/SecondDesk/releases/download/v1.3.3/SecondDesk-v1.3.3-Windows-Setup.exe'
$sha256 = '2C1ACAE452F6332147BCD92BB4D0F209323A52AAFF37CB2E0C88BC5AF335A1AA'
$file = Join-Path $env:TEMP 'SecondDesk-v1.3.3-Windows-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 '/S' -Wait install-second-desk.ps1
$url = 'https://github.com/Ryanisgood/SecondDesk/releases/download/v1.3.3/SecondDesk-v1.3.3-Windows.msi'
$sha256 = '8187DD74042867E97513A775DE7BBB03BF72FA1CDCD40118B53865E9B53243C7'
$file = Join-Path $env:TEMP 'SecondDesk-v1.3.3-Windows.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