SimpleTexを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id SimpleTex.SimpleTex -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id SimpleTex.SimpleTex -e --silentwinget uninstall --id SimpleTex.SimpleTex -e --silentインストーラー別
64ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
"SimpleTex Setup 0.2.12.exe" /Sインストール先を指定
"SimpleTex Setup 0.2.12.exe" /S /D=C:\Apps\simpletex- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\f8367960-f4b5-512e-b54f-75b7c75137ad
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-simpletex.ps1
$url = 'https://update.simpletex.net/publish/electron/win32/SimpleTex%20Setup%200.2.12.exe'
$sha256 = '0B0CAA9339F976E36CC5A4FA24F1C7CE0883CF3830C586F2DA6D34C35E0BF770'
$file = Join-Path $env:TEMP 'SimpleTex Setup 0.2.12.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