免互動安裝Keyguard、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id ArtemChepurnyi.Keyguard -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id ArtemChepurnyi.Keyguard -e --silentwinget uninstall --id ArtemChepurnyi.Keyguard -e --silent依安裝檔
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i Keyguard-3.8.0.msi /qn /norestart寫入記錄檔
msiexec /i Keyguard-3.8.0.msi /qn /norestart /l*v "%TEMP%\keyguard-install.log"解除安裝
msiexec /x {BED172A0-A0D5-3FA3-8D03-896ECA322526} /qn /norestart- MSI產品代碼
- {BED172A0-A0D5-3FA3-8D03-896ECA322526}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BED172A0-A0D5-3FA3-8D03-896ECA322526}
- UpgradeCode
- {846C6281-F349-4833-9E0E-AAE1C06006A0}
ARM64 · MSI · 所有使用者
靜默安裝
msiexec /i Keyguard-3.8.0-aarch64.msi /qn /norestart寫入記錄檔
msiexec /i Keyguard-3.8.0-aarch64.msi /qn /norestart /l*v "%TEMP%\keyguard-install.log"解除安裝
msiexec /x {1D34D444-0A9B-4894-A4EC-56C39EE05EED} /qn /norestart- MSI產品代碼
- {1D34D444-0A9B-4894-A4EC-56C39EE05EED}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1D34D444-0A9B-4894-A4EC-56C39EE05EED}
- UpgradeCode
- {846C6281-F349-4833-9E0E-AAE1C06006A0}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-keyguard.ps1
$url = 'https://github.com/AChep/keyguard-app/releases/download/r20261109/Keyguard-3.8.0.msi'
$sha256 = '528F5E9D3FAE7B8D43C479530EE7271F5132EED2A292900C95C6EDCFAD3F9535'
$file = Join-Path $env:TEMP 'Keyguard-3.8.0.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-keyguard.ps1
$url = 'https://github.com/AChep/keyguard-app/releases/download/r20261109/Keyguard-3.8.0-aarch64.msi'
$sha256 = 'DF5F5250C482BB73BBDE91A146B341FD582AACF3D9C4E84B75DBAD0D552A8FA6'
$file = Join-Path $env:TEMP 'Keyguard-3.8.0-aarch64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait