DWordsを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id LuyuHuang.DWords2 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id LuyuHuang.DWords2 -e --silentwinget uninstall --id LuyuHuang.DWords2 -e --silentインストーラー別
64ビット · EXE(NSIS) · 現在のユーザー
サイレントインストール
DWords.Setup.0.2.3.exe /Sインストール先を指定
DWords.Setup.0.2.3.exe /S /D=C:\Apps\dwords- アンインストール用レジストリキー
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\c693f666-b3ca-5779-a8be-c126d18d11c1
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-dwords.ps1
$url = 'https://github.com/luyuhuang/DWords2/releases/download/v0.2.3/DWords.Setup.0.2.3.exe'
$sha256 = 'C11A2121C729FB44505DBF8FC41C4DD2B6321F18F5B594D8D41F7EF036881D76'
$file = Join-Path $env:TEMP 'DWords.Setup.0.2.3.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