免互動安裝QTextPad、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id QTextPad.QTextPad -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id QTextPad.QTextPad -e --silentwinget uninstall --id QTextPad.QTextPad -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
qtextpad-x64-2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
qtextpad-x64-2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\qtextpad"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7DDD3218-1920-4278-9C33-E3AF37F3E7A4}_is1
- 安裝資料夾
- %ProgramFiles%\QTextPad
- DisplayVersion
- 2.0
ARM64 · EXE(Inno Setup) · 所有使用者 · en-US
靜默安裝
qtextpad-arm64-2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
qtextpad-arm64-2.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\qtextpad"- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7DDD3218-1920-4278-9C33-E3AF37F3E7A4}_is1
- 安裝資料夾
- %ProgramFiles%\QTextPad
- DisplayVersion
- 2.0
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-qtextpad.ps1
$url = 'https://github.com/zrax/qtextpad/releases/download/2.0/qtextpad-x64-2.0.exe'
$sha256 = '2F1A27E1EC59DF0DFE9C57AB7E6C4BBA7B7DA6B9C69AB9F39124729559D50524'
$file = Join-Path $env:TEMP 'qtextpad-x64-2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait install-qtextpad.ps1
$url = 'https://github.com/zrax/qtextpad/releases/download/2.0/qtextpad-arm64-2.0.exe'
$sha256 = 'CFBBA5BF77D6D4F3DD6F021BAB83B511B07E3562D2D488499BCF550609BA5852'
$file = Join-Path $env:TEMP 'qtextpad-arm64-2.0.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 '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait