免互動安裝Key Remapper、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id ATNSOFT.KeyRemapper -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ATNSOFT.KeyRemapper -e --silentwinget uninstall --id ATNSOFT.KeyRemapper -e --silent依安裝檔
64位元 · EXE(Inno Setup) · 所有使用者
靜默安裝
keyremapper_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-自訂安裝資料夾
keyremapper_setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\key-remapper"PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-key-remapper.ps1
$url = 'https://atnsoft.com/downloads/keyremapper_setup.exe'
$sha256 = '10284A7B6318B32B1A7C400170C99333C215C28B802382B0D11D4676DA6759B9'
$file = Join-Path $env:TEMP 'keyremapper_setup.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