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