Add Microsoft Access Database Engine 2016 Redistributable as a Windows Fleet-maintained app (#50365)

**Related issue:** Resolves #50325

Adds Microsoft Access Database Engine 2016 Redistributable as a Windows
Fleet-maintained app, from winget `Microsoft.AccessDatabaseEngine2016`
(16.0.5044.1000, x64). Found in a customer's Windows deployment catalog
with no Fleet equivalent.

## No ingester change was needed after all

When I scoped this I expected to need a one-line change, because winget
types the installer as `portable`, which is not in the ingester's
`vendorTypes` or `fileTypes`. I tested it first: `"installer_type":
"portable"` with an empty scope matches cleanly, and since the generated
output carries no installer type (Fleet infers `.exe` from the URL), the
result is correct as-is.

This is the first FMA input to use `portable`. If reviewers would rather
not establish that precedent, adding `portable` alongside
`wix`/`nullsoft`/`inno` in `vendorTypes` would let the type fall through
to the URL extension and the input could then say `exe`. Both work. I
chose the one that touches no shared code.

## Identity: winget's name is wrong twice over

winget's locale manifest says `Microsoft Access Database Engine 2016
Redistributable`. The MSI says:

```
ProductName    Microsoft Access database engine 2016 (English)
Manufacturer   Microsoft Corporation
ProductCode    {90160000-00D1-0409-1000-0000000FF1CE}
UpgradeCode    {00160000-00D1-0000-1000-0000000FF1CE}
ALLUSERS       1
```

Two traps: the real name is lowercase `database engine`, and it carries
an `(English)` locale suffix with the LCID (`0409`) embedded in the
ProductCode. osquery's `=` on TEXT is case-sensitive, so the
winget-derived name would have matched nothing.

## x64 only, deliberately

The customer deploys both architectures, but **x86 and x64 register the
identical DisplayName**. I confirmed this by extracting both installers:

| Arch | ProductName | UpgradeCode |
|---|---|---|
| x64 | `Microsoft Access database engine 2016 (English)` |
`{00160000-00D1-0000-1000-0000000FF1CE}` |
| x86 | `Microsoft Access database engine 2016 (English)` |
`{00160000-00D1-0000-0000-0000000FF1CE}` |

They differ only by product and upgrade code. Two FMAs could not be told
apart by an exists query, so installing one would make the other report
itself installed. Shipping x64 only avoids that. This also corrects my
earlier note on the issue suggesting the architecture go in the catalog
name; that would distinguish the catalog entries but not the detection
queries, so it would not have helped.

The uninstall script resolves the product from the x64 upgrade code
rather than a product code, so it removes the x64 build and leaves an
x86 install alone.

## The Office conflict is handled, not hidden

This redistributable refuses to install when Office of the opposite
bitness is present. Following the same approach @allenhouchins set out
for HandBrake in #50323, the install script checks the Click-to-Run
platform first and exits with an actionable message instead of a bare
installer failure:

```
32-bit Microsoft Office is installed on this host (Click-to-Run platform: x86).
The 64-bit Access Database Engine cannot be installed alongside it. Use the 32-bit redistributable instead.
```

**A green validator here proves less than usual.** The CI runner has no
Office installed, so it exercises the happy path only. The conflict this
app is known for cannot be reproduced there. That is a limitation of the
environment, not evidence the app is safe on managed hosts, and it is
the main thing worth weighing before merging.

## Other notes

- Installer SHA confirmed against a local download of
`accessdatabaseengine_X64.exe` (`04e96c9f…03de`).
- The download is a self-extracting package. Its `setup.cmd` runs
`InstallUCRT.exe` and then `msiexec %1 /i AceRedist.msi`, which is why
`/quiet` reaches the MSI.
- **No icon.** The MSI has no `ARPPRODUCTICON` and no Icon table, so
there is nothing to extract. The app falls back to the generic software
icon, which suits a redistributable with no user-facing app.

# Checklist for submitter

- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added Microsoft Access Database Engine 2016 Redistributable as a
supported Windows application.
* Added silent installation and uninstallation workflows with
architecture checks, registration detection, timeout handling, and
standard success-code support.
* Included package metadata, version information, download verification,
Developer tools categorization, and reliable installation-state
detection.
* Added handling for existing installations and validated installer
outcomes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Allen Houchins <allenhouchins@mac.com>
This commit is contained in:
kitzy
2026-08-02 22:59:48 -05:00
committed by GitHub
co-authored by Allen Houchins
parent 5fa8a0a9ea
commit 332d8a2cee
5 changed files with 176 additions and 0 deletions
@@ -0,0 +1,12 @@
{
"name": "Microsoft Access Database Engine 2016 Redistributable",
"slug": "microsoft-access-database-engine-2016/windows",
"package_identifier": "Microsoft.AccessDatabaseEngine2016",
"unique_identifier": "Microsoft Access database engine 2016 (English)",
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/microsoft_access_database_engine_2016_install.ps1",
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/microsoft_access_database_engine_2016_uninstall.ps1",
"installer_arch": "x64",
"installer_type": "portable",
"installer_scope": "",
"default_categories": ["Developer tools"]
}
@@ -0,0 +1,85 @@
# Learn more about .exe install scripts:
# http://fleetdm.com/learn-more-about/exe-install-scripts
#
# Self-extracting package whose setup.cmd forwards its first argument to
# "msiexec /i AceRedist.msi", so /quiet reaches the MSI.
$exeFilePath = "${env:INSTALLER_PATH}"
$installTimeoutSeconds = 420
$registrationTimeoutSeconds = 120
# The x64 build registers here; the x86 build, which shares this DisplayName,
# registers under Wow6432Node. Matching the native view alone keeps a pre-existing
# x86 install from passing as a successful x64 install.
$machineKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
function Get-AccessDatabaseEngineEntry {
Get-ChildItem -Path $machineKey -ErrorAction SilentlyContinue |
ForEach-Object { Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue } |
Where-Object {
$_.DisplayName -eq "Microsoft Access database engine 2016 (English)" -and
$_.Publisher -eq "Microsoft Corporation"
} |
Select-Object -First 1
}
try {
$officeConfig = 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration'
$officePlatform = (Get-ItemProperty -Path $officeConfig -Name Platform -ErrorAction SilentlyContinue).Platform
if ($officePlatform -eq 'x86') {
Write-Host "32-bit Microsoft Office is installed on this host (Click-to-Run platform: x86)."
Write-Host "The 64-bit Access Database Engine cannot be installed alongside it. Use the 32-bit redistributable instead."
Exit 1
}
# -Wait also waits on descendants, so wait on the installer process alone.
$process = Start-Process -FilePath "$exeFilePath" -ArgumentList "/quiet" -PassThru
# Keeps .ExitCode readable after the process ends.
$null = $process.Handle
$killed = $false
if (-not $process.WaitForExit($installTimeoutSeconds * 1000)) {
# Stop the bootstrapper only; killing a child msiexec mid-transaction would
# leave a half-installed product.
Write-Host "Installer process did not exit within ${installTimeoutSeconds}s, stopping it."
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
$null = $process.WaitForExit(30 * 1000)
$killed = $true
}
$exitCode = $null
if (-not $killed -and $process.HasExited) {
$exitCode = $process.ExitCode
Write-Host "Install exit code: $exitCode"
}
# The installer can return before the ARP entry is written.
$elapsed = 0
while (-not (Get-AccessDatabaseEngineEntry) -and ($elapsed -lt $registrationTimeoutSeconds)) {
Start-Sleep -Seconds 5
$elapsed += 5
Write-Host "Waiting for the Access Database Engine to register... ($elapsed seconds)"
}
$entry = Get-AccessDatabaseEngineEntry
if (-not $entry) {
Write-Host "The Access Database Engine did not register in Add/Remove Programs."
if ($null -ne $exitCode -and $exitCode -ne 0) { Exit $exitCode }
Exit 1
}
Write-Host "Registered '$($entry.DisplayName)' by '$($entry.Publisher)', version $($entry.DisplayVersion)."
# Registration is the success signal, so a non-zero code (1638 means the engine
# is already present) is logged rather than failed.
if ($null -ne $exitCode -and @(0, 3010, 1641) -notcontains $exitCode) {
Write-Host "Installer returned $exitCode but the product is registered; treating the install as successful."
}
Exit 0
} catch {
Write-Host "Error: $_"
Exit 1
}
@@ -0,0 +1,50 @@
# The x86 and x64 redistributables share a DisplayName and differ only by
# product code, so resolve the installed product from the x64 upgrade code.
$upgradeCode = '{00160000-00D1-0000-1000-0000000FF1CE}'
$displayName = 'Microsoft Access database engine 2016 (English)'
$timeoutSeconds = 300
$successCodes = @(0, 3010, 1641)
# The x64 build registers here; the x86 build registers under Wow6432Node.
$nativeUninstallKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
try {
$inst = New-Object -ComObject "WindowsInstaller.Installer"
$productCodes = @()
try {
$productCodes = @($inst.RelatedProducts($upgradeCode))
} catch {
# RelatedProducts throws when nothing is installed for the upgrade code,
# so confirm against the registry before calling that a clean uninstall.
Write-Host "Could not enumerate products for upgrade code ${upgradeCode}: $($_.Exception.Message)"
$registered = Get-ItemProperty -Path $nativeUninstallKey -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -eq $displayName } |
Select-Object -First 1
if ($registered) {
Write-Host "'$displayName' is still registered, so this is a real failure."
Exit 1
}
}
if ($productCodes.Count -eq 0) { Write-Host "No installed product found for upgrade code $upgradeCode."; Exit 0 }
foreach ($productCode in $productCodes) {
$process = Start-Process msiexec -ArgumentList @("/quiet", "/x", $productCode, "/norestart") -PassThru
# Keeps .ExitCode readable after the process ends.
$null = $process.Handle
if (-not $process.WaitForExit($timeoutSeconds * 1000)) {
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
Write-Host "Uninstall for $productCode timed out."
Exit 1603
}
$exitCode = $process.ExitCode
if ($null -eq $exitCode) {
Write-Host "Uninstall for $productCode reported no exit code."
Exit 1603
}
Write-Host "Uninstall for $productCode exited $exitCode"
if ($successCodes -notcontains $exitCode) { Exit $exitCode }
}
} catch { Write-Host "Error: $_"; Exit 1 }
Exit 0
+7
View File
@@ -5384,6 +5384,13 @@
"unique_identifier": "com.microsoft.m365copilot",
"description": "Microsoft 365 Copilot is an AI-powered productivity assistant that integrates with Microsoft 365 apps."
},
{
"name": "Microsoft Access Database Engine 2016 Redistributable",
"slug": "microsoft-access-database-engine-2016/windows",
"platform": "windows",
"unique_identifier": "Microsoft Access database engine 2016 (English)",
"description": "Microsoft Access Database Engine 2016 Redistributable provides OLE DB and ODBC drivers for reading Access databases and Office data sources without installing Office."
},
{
"name": "Microsoft Auto Update",
"slug": "microsoft-auto-update/darwin",
@@ -0,0 +1,22 @@
{
"versions": [
{
"version": "16.0.5044.1000",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name = 'Microsoft Access database engine 2016 (English)' AND publisher = 'Microsoft Corporation';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Microsoft Access database engine 2016 (English)' AND publisher = 'Microsoft Corporation' AND version_compare(version, '16.0.5044.1000') < 0);"
},
"installer_url": "https://download.microsoft.com/download/3/5/c/35c84c36-661a-44e6-9324-8786b8dbe231/accessdatabaseengine_X64.exe",
"install_script_ref": "877f9b39",
"uninstall_script_ref": "355fe65e",
"sha256": "04e96c9f1a1f7d251a88aececf1dc10ff65950392787427c00814a43308003de",
"default_categories": [
"Developer tools"
]
}
],
"refs": {
"355fe65e": "# The x86 and x64 redistributables share a DisplayName and differ only by\n# product code, so resolve the installed product from the x64 upgrade code.\n$upgradeCode = '{00160000-00D1-0000-1000-0000000FF1CE}'\n$displayName = 'Microsoft Access database engine 2016 (English)'\n$timeoutSeconds = 300\n$successCodes = @(0, 3010, 1641)\n\n# The x64 build registers here; the x86 build registers under Wow6432Node.\n$nativeUninstallKey = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n\ntry {\n $inst = New-Object -ComObject \"WindowsInstaller.Installer\"\n $productCodes = @()\n try {\n $productCodes = @($inst.RelatedProducts($upgradeCode))\n } catch {\n # RelatedProducts throws when nothing is installed for the upgrade code,\n # so confirm against the registry before calling that a clean uninstall.\n Write-Host \"Could not enumerate products for upgrade code ${upgradeCode}: $($_.Exception.Message)\"\n $registered = Get-ItemProperty -Path $nativeUninstallKey -ErrorAction SilentlyContinue |\n Where-Object { $_.DisplayName -eq $displayName } |\n Select-Object -First 1\n if ($registered) {\n Write-Host \"'$displayName' is still registered, so this is a real failure.\"\n Exit 1\n }\n }\n\n if ($productCodes.Count -eq 0) { Write-Host \"No installed product found for upgrade code $upgradeCode.\"; Exit 0 }\n\n foreach ($productCode in $productCodes) {\n $process = Start-Process msiexec -ArgumentList @(\"/quiet\", \"/x\", $productCode, \"/norestart\") -PassThru\n # Keeps .ExitCode readable after the process ends.\n $null = $process.Handle\n if (-not $process.WaitForExit($timeoutSeconds * 1000)) {\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n Write-Host \"Uninstall for $productCode timed out.\"\n Exit 1603\n }\n $exitCode = $process.ExitCode\n if ($null -eq $exitCode) {\n Write-Host \"Uninstall for $productCode reported no exit code.\"\n Exit 1603\n }\n Write-Host \"Uninstall for $productCode exited $exitCode\"\n if ($successCodes -notcontains $exitCode) { Exit $exitCode }\n }\n} catch { Write-Host \"Error: $_\"; Exit 1 }\n\nExit 0\n",
"877f9b39": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n#\n# Self-extracting package whose setup.cmd forwards its first argument to\n# \"msiexec /i AceRedist.msi\", so /quiet reaches the MSI.\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\n$installTimeoutSeconds = 420\n$registrationTimeoutSeconds = 120\n\n# The x64 build registers here; the x86 build, which shares this DisplayName,\n# registers under Wow6432Node. Matching the native view alone keeps a pre-existing\n# x86 install from passing as a successful x64 install.\n$machineKey = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n\nfunction Get-AccessDatabaseEngineEntry {\n Get-ChildItem -Path $machineKey -ErrorAction SilentlyContinue |\n ForEach-Object { Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue } |\n Where-Object {\n $_.DisplayName -eq \"Microsoft Access database engine 2016 (English)\" -and\n $_.Publisher -eq \"Microsoft Corporation\"\n } |\n Select-Object -First 1\n}\n\ntry {\n\n$officeConfig = 'HKLM:\\SOFTWARE\\Microsoft\\Office\\ClickToRun\\Configuration'\n$officePlatform = (Get-ItemProperty -Path $officeConfig -Name Platform -ErrorAction SilentlyContinue).Platform\nif ($officePlatform -eq 'x86') {\n Write-Host \"32-bit Microsoft Office is installed on this host (Click-to-Run platform: x86).\"\n Write-Host \"The 64-bit Access Database Engine cannot be installed alongside it. Use the 32-bit redistributable instead.\"\n Exit 1\n}\n\n# -Wait also waits on descendants, so wait on the installer process alone.\n$process = Start-Process -FilePath \"$exeFilePath\" -ArgumentList \"/quiet\" -PassThru\n# Keeps .ExitCode readable after the process ends.\n$null = $process.Handle\n\n$killed = $false\nif (-not $process.WaitForExit($installTimeoutSeconds * 1000)) {\n # Stop the bootstrapper only; killing a child msiexec mid-transaction would\n # leave a half-installed product.\n Write-Host \"Installer process did not exit within ${installTimeoutSeconds}s, stopping it.\"\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n $null = $process.WaitForExit(30 * 1000)\n $killed = $true\n}\n\n$exitCode = $null\nif (-not $killed -and $process.HasExited) {\n $exitCode = $process.ExitCode\n Write-Host \"Install exit code: $exitCode\"\n}\n\n# The installer can return before the ARP entry is written.\n$elapsed = 0\nwhile (-not (Get-AccessDatabaseEngineEntry) -and ($elapsed -lt $registrationTimeoutSeconds)) {\n Start-Sleep -Seconds 5\n $elapsed += 5\n Write-Host \"Waiting for the Access Database Engine to register... ($elapsed seconds)\"\n}\n\n$entry = Get-AccessDatabaseEngineEntry\nif (-not $entry) {\n Write-Host \"The Access Database Engine did not register in Add/Remove Programs.\"\n if ($null -ne $exitCode -and $exitCode -ne 0) { Exit $exitCode }\n Exit 1\n}\nWrite-Host \"Registered '$($entry.DisplayName)' by '$($entry.Publisher)', version $($entry.DisplayVersion).\"\n\n# Registration is the success signal, so a non-zero code (1638 means the engine\n# is already present) is logged rather than failed.\nif ($null -ne $exitCode -and @(0, 3010, 1641) -notcontains $exitCode) {\n Write-Host \"Installer returned $exitCode but the product is registered; treating the install as successful.\"\n}\n\nExit 0\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
}
}