DoScriptを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id TheServer-lab.DoScript -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id TheServer-lab.DoScript -e --silentwinget uninstall --id TheServer-lab.DoScript -e --silentインストーラー別
32ビット · EXE(NSIS)
サイレントインストール
DoScriptSetup.exe /Sインストール先を指定
DoScriptSetup.exe /S /D=C:\Apps\doscriptPowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-doscript.ps1
$url = 'https://github.com/TheServer-lab/DoScript/releases/download/latest-release/DoScriptSetup.exe'
$sha256 = '7D5CDDA755857FCFC7CD07B210A82BF0183C8AC3E8149632AA2E8E45CD7A7DD3'
$file = Join-Path $env:TEMP 'DoScriptSetup.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