Add Microsoft ODBC Driver 17 for SQL Server as a Windows FMA (#50342)

**Related issue:** Resolves #50326

Adds Microsoft ODBC Driver 17 for SQL Server as a Windows
Fleet-maintained app, from winget `Microsoft.msodbcsql.17` (17.11.1.1,
MSI, machine scope, x64, en-US). Found in a customer's ManageEngine
ServiceDesk Plus Windows deployment catalog with no Fleet equivalent.

## The install would fail without a custom script

The MSI refuses to install unless `IACCEPTMSODBCSQLLICENSETERMS=YES` is
passed. This is not just a winget convention — the MSI carries the
condition and the matching error string:

```
IACCEPTMSODBCSQLLICENSETERMS ~=
IACCEPTMSODBCSQLLICENSETERMS=YES command-line parameter is missing.
```

Fleet's default MSI install script passes only `/quiet /norestart /i`,
so without the small custom script in this PR every install would fail.
Uninstall is still the auto-generated upgrade-code script, which is
correct as-is.

## Verification

Identity read from the MSI Property table:

```
ProductName    Microsoft ODBC Driver 17 for SQL Server
Manufacturer   Microsoft Corporation
ProductCode    {ACBA503E-64A9-4A8A-A6CC-63656F395618}
UpgradeCode    {0123A210-9B73-46E7-B5CE-7F33630300E7}
ALLUSERS       1
```

- Installer SHA confirmed against a local download (`0f642870…bd4e`).
- `ALLUSERS=1` means it always installs per-machine.
- The generated uninstall script correctly picked up the **x64**
UpgradeCode — note the x86 build uses a different one, so an arch mix-up
here would silently fail to uninstall.

**No version pinning is needed in the exists query.** When I scoped this
I expected to need `AND version LIKE '17.%'` the way the Amazon Corretto
FMAs do, but the `ProductName` already carries the major version, so
`Microsoft ODBC Driver 17 for SQL Server` and `...18...` are naturally
distinct entries. Simple equality is correct and unambiguous.

## Two notes for reviewers

**Icon quality.** The MSI's `ARPPRODUCTICON` stream tops out at 32×32,
so the 128×128 asset here is an upscale and looks soft. It is the
authentic Add/Remove Programs icon, but if we would rather fall back to
the generic software icon than ship a blurry one, drop the icon files
and I will regenerate without them.

**Icon map key needed a manual fix.** The generator derives its key from
the slug and produced `"microsoft odbc driver 17"`, but lookups use the
lowercased catalog name — `"microsoft odbc driver 17 for sql server"`.
Corrected by hand. Same generator gap hit Paint.NET in #50340.

**Dependency.** The manifest declares `Microsoft.VCRedist.2015+.x64`.
The ingester ignores winget `Dependencies`, but unlike HandBrake
(#50323) we do ship a matching FMA (`vc-redist-x64/windows`), and the
redistributable is present on most Windows hosts already. Noting it
rather than treating it as a blocker.

# 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 ODBC Driver 17 for SQL Server to the maintained
software catalog.
* Added Windows installation and upgrade support for version 17.11.1.1.
  * Added the software’s icon and catalog display details.
* Included silent installation, logging, license acceptance, and reboot
handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
kitzy
2026-08-03 00:30:07 -05:00
committed by GitHub
parent 407db89ff5
commit 86f4619faf
7 changed files with 79 additions and 0 deletions
@@ -0,0 +1,11 @@
{
"name": "Microsoft ODBC Driver 17 for SQL Server",
"slug": "microsoft-odbc-driver-17/windows",
"package_identifier": "Microsoft.msodbcsql.17",
"unique_identifier": "Microsoft ODBC Driver 17 for SQL Server",
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1",
"installer_arch": "x64",
"installer_type": "msi",
"installer_scope": "machine",
"default_categories": ["Developer tools"]
}
@@ -0,0 +1,22 @@
# The MSI refuses to install without IACCEPTMSODBCSQLLICENSETERMS=YES, which the
# default MSI install script does not pass.
$logFile = "${env:TEMP}/fleet-install-software.log"
try {
$installProcess = Start-Process msiexec.exe `
-ArgumentList "/quiet /norestart /lv ${logFile} /i `"${env:INSTALLER_PATH}`" IACCEPTMSODBCSQLLICENSETERMS=YES" `
-PassThru -Verb RunAs -Wait
Get-Content $logFile -Tail 500
# 3010 (reboot required) and 1641 (reboot initiated) are successful installs.
if ($installProcess.ExitCode -eq 3010 -or $installProcess.ExitCode -eq 1641) { Exit 0 }
Exit $installProcess.ExitCode
} catch {
Write-Host "Error: $_"
Exit 1
}
+7
View File
@@ -5447,6 +5447,13 @@
"unique_identifier": "com.microsoft.Excel",
"description": "Microsoft Excel is the industry-standard spreadsheet software, perfect for data analysis, reporting, and visualization."
},
{
"name": "Microsoft ODBC Driver 17 for SQL Server",
"slug": "microsoft-odbc-driver-17/windows",
"platform": "windows",
"unique_identifier": "Microsoft ODBC Driver 17 for SQL Server",
"description": "Microsoft ODBC Driver 17 for SQL Server lets applications connect to SQL Server and Azure SQL Database through the ODBC interface."
},
{
"name": "Microsoft Office",
"slug": "microsoft-office/windows",
@@ -0,0 +1,23 @@
{
"versions": [
{
"version": "17.11.1.1",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name = 'Microsoft ODBC Driver 17 for SQL Server' AND publisher = 'Microsoft Corporation';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Microsoft ODBC Driver 17 for SQL Server' AND publisher = 'Microsoft Corporation' AND version_compare(version, '17.11.1.1') < 0);"
},
"installer_url": "https://download.microsoft.com/download/d99fcd4f-548f-46e6-83d5-b9eb62b373d5/amd64/1033/msodbcsql.msi",
"install_script_ref": "5a2f9a9f",
"uninstall_script_ref": "e1c68d7e",
"sha256": "0f6428706ac1fa4863d10e515135b587de88011813131c0a43f70cd70dc0bd4e",
"default_categories": [
"Developer tools"
],
"upgrade_code": "{0123A210-9B73-46E7-B5CE-7F33630300E7}"
}
],
"refs": {
"5a2f9a9f": "# The MSI refuses to install without IACCEPTMSODBCSQLLICENSETERMS=YES, which the\n# default MSI install script does not pass.\n\n$logFile = \"${env:TEMP}/fleet-install-software.log\"\n\ntry {\n\n$installProcess = Start-Process msiexec.exe `\n -ArgumentList \"/quiet /norestart /lv ${logFile} /i `\"${env:INSTALLER_PATH}`\" IACCEPTMSODBCSQLLICENSETERMS=YES\" `\n -PassThru -Verb RunAs -Wait\n\nGet-Content $logFile -Tail 500\n\n# 3010 (reboot required) and 1641 (reboot initiated) are successful installs.\nif ($installProcess.ExitCode -eq 3010 -or $installProcess.ExitCode -eq 1641) { Exit 0 }\n\nExit $installProcess.ExitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
"e1c68d7e": "# Fleet uninstalls app by finding all related product codes for the specified upgrade code\n$inst = New-Object -ComObject \"WindowsInstaller.Installer\"\n$timeoutSeconds = 300 # 5 minute timeout per product\n\n# MSI exit codes that indicate success. 3010 = ERROR_SUCCESS_REBOOT_REQUIRED,\n# 1641 = ERROR_SUCCESS_REBOOT_INITIATED. Treat these as success rather than failure.\n$successCodes = @(0, 3010, 1641)\n\nforeach ($product_code in $inst.RelatedProducts('{0123A210-9B73-46E7-B5CE-7F33630300E7}')) {\n $process = Start-Process msiexec -ArgumentList @(\"/quiet\", \"/x\", $product_code, \"/norestart\") -PassThru\n\n # Wait for process with timeout\n $completed = $process.WaitForExit($timeoutSeconds * 1000)\n\n if (-not $completed) {\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n Exit 1603 # ERROR_UNINSTALL_FAILURE\n }\n\n # If the uninstall failed, bail\n if ($successCodes -notcontains $process.ExitCode) {\n Write-Output \"Uninstall for $($product_code) exited $($process.ExitCode)\"\n Exit $process.ExitCode\n }\n}\n\n# All uninstalls succeeded; exit success\nExit 0\n"
}
}
File diff suppressed because one or more lines are too long
@@ -644,6 +644,7 @@ import MicrosoftAutoUpdate from "./MicrosoftAutoUpdate";
import MicrosoftAzureStorageExplorer from "./MicrosoftAzureStorageExplorer";
import MicrosoftDotnetRuntime from "./MicrosoftDotnetRuntime";
import MicrosoftEdge from "./MicrosoftEdge";
import MicrosoftOdbcDriver17 from "./MicrosoftOdbcDriver17";
import MicrosoftOffice from "./MicrosoftOffice";
import MicrosoftOneNote from "./MicrosoftOneNote";
import MicrosoftOutlook from "./MicrosoftOutlook";
@@ -1800,6 +1801,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
"microsoft azure storage explorer": MicrosoftAzureStorageExplorer,
"microsoft edge": Edge,
"microsoft excel": Excel,
"microsoft odbc driver 17 for sql server": MicrosoftOdbcDriver17,
"microsoft office": MicrosoftOffice,
"microsoft onenote": MicrosoftOneNote,
"microsoft outlook": MicrosoftOutlook,
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB