免互動安裝DocAttic、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id MRHConsultants.DocAttic -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id MRHConsultants.DocAttic -e --silentwinget uninstall --id MRHConsultants.DocAttic -e --silent依安裝檔
64位元 · MSI · en-US
靜默安裝
msiexec /i DocAttic-1.1.0.msi /qn /norestart寫入記錄檔
msiexec /i DocAttic-1.1.0.msi /qn /norestart /l*v "%TEMP%\docattic-install.log"解除安裝
msiexec /x {2B758196-986D-3377-8219-D1B8AFCFFB03} /qn /norestart- MSI產品代碼
- {2B758196-986D-3377-8219-D1B8AFCFFB03}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2B758196-986D-3377-8219-D1B8AFCFFB03}
- UpgradeCode
- {419C31F4-408F-4A12-9B27-FCD6B76A18A6}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-docattic.ps1
$url = 'https://docattic.com/downloads/DocAttic-1.1.0.msi'
$sha256 = '05272717C7CF4D5D956CBEEC2C9E1B384FD4593C0CF4DA9704B175818259AB1D'
$file = Join-Path $env:TEMP 'DocAttic-1.1.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