免互動安裝Microsoft Access database engine 2016、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。
相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式
使用winget
PowerShell
winget install --id Microsoft.AccessDatabaseEngine.2016 -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.AccessDatabaseEngine.2016 -e --silentwinget uninstall --id Microsoft.AccessDatabaseEngine.2016 -e --silent依安裝檔
64位元 · EXE · 所有使用者
靜默安裝
accessdatabaseengine_X64.exe /quiet /norestart解除安裝
msiexec /x {90160000-00D1-0409-1000-0000000FF1CE} /qn /norestart- MSI產品代碼
- {90160000-00D1-0409-1000-0000000FF1CE}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-00D1-0409-1000-0000000FF1CE}
- UpgradeCode
- {00160000-00D1-0000-1000-0000000FF1CE}
32位元 · EXE · 所有使用者
靜默安裝
accessdatabaseengine.exe /quiet /norestart解除安裝
msiexec /x {90160000-00D1-0409-0000-0000000FF1CE} /qn /norestart- MSI產品代碼
- {90160000-00D1-0409-0000-0000000FF1CE}
- 解除安裝登錄機碼
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-00D1-0409-0000-0000000FF1CE}
- UpgradeCode
- {00160000-00D1-0000-0000-0000000FF1CE}
PowerShell:下載、驗證、安裝
下載官方檔案,驗證SHA256後靜默安裝。
install-microsoft-access-database-engine-2016.ps1
$url = 'https://download.microsoft.com/download/3/5/c/35c84c36-661a-44e6-9324-8786b8dbe231/accessdatabaseengine_X64.exe'
$sha256 = '04E96C9F1A1F7D251A88AECECF1DC10FF65950392787427C00814A43308003DE'
$file = Join-Path $env:TEMP 'accessdatabaseengine_X64.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 '/quiet /norestart' -Wait install-microsoft-access-database-engine-2016.ps1
$url = 'https://download.microsoft.com/download/3/5/c/35c84c36-661a-44e6-9324-8786b8dbe231/accessdatabaseengine.exe'
$sha256 = 'ADC0504656F390D225530AC09F1FC2113295C4F9BAEFFEA1E983FECF4AC960F0'
$file = Join-Path $env:TEMP 'accessdatabaseengine.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 '/quiet /norestart' -Wait