免互動安裝Annotator、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Snijderlab.Annotator -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Snijderlab.Annotator -e --silentwinget uninstall --id Snijderlab.Annotator -e --silent依安裝檔
64位元 · EXE(NSIS) · 僅目前使用者
靜默安裝
Annotator_1.2.1_x64-setup.exe /S自訂安裝資料夾
Annotator_1.2.1_x64-setup.exe /S /D=C:\Apps\annotator- 解除安裝登錄機碼
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Annotator
64位元 · MSI · 所有使用者
靜默安裝
msiexec /i Annotator_1.2.1_x64_en-US.msi /qn /norestart寫入記錄檔
msiexec /i Annotator_1.2.1_x64_en-US.msi /qn /norestart /l*v "%TEMP%\annotator-install.log"解除安裝
msiexec /x {CD54010F-22D5-4D73-BBF3-D0BEC5AB75CE} /qn /norestart- MSI產品代碼
- {CD54010F-22D5-4D73-BBF3-D0BEC5AB75CE}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CD54010F-22D5-4D73-BBF3-D0BEC5AB75CE}
- UpgradeCode
- {7EEB6BC5-23EA-51E1-B28D-FC9633D3F90D}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-annotator.ps1
$url = 'https://github.com/snijderlab/annotator/releases/download/v1.2.1/Annotator_1.2.1_x64-setup.exe'
$sha256 = '8E33ECE379158DB40133992A0BF176B67F1C802EDBA409DD28FCE687D2C88452'
$file = Join-Path $env:TEMP 'Annotator_1.2.1_x64-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 '/S' -Wait install-annotator.ps1
$url = 'https://github.com/snijderlab/annotator/releases/download/v1.2.1/Annotator_1.2.1_x64_en-US.msi'
$sha256 = '0DC50728D0D487B5AAD1B3F73498C2FD9579BDD311DA453385ABE4DEFD5677F6'
$file = Join-Path $env:TEMP 'Annotator_1.2.1_x64_en-US.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