Skip to content

Add Microsoft ODBC Driver 17 for SQL Server as a Windows Fleet-maintained app - #50342

Open
kitzy wants to merge 3 commits into
mainfrom
add-msodbcsql-17-windows-fma
Open

Add Microsoft ODBC Driver 17 for SQL Server as a Windows Fleet-maintained app#50342
kitzy wants to merge 3 commits into
mainfrom
add-msodbcsql-17-windows-fma

Conversation

@kitzy

@kitzy kitzy commented Jul 31, 2026

Copy link
Copy Markdown
Member

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

  • QA'd all new/changed functionality manually

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.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.18%. Comparing base (2fd2a02) to head (b903010).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...arePage/components/icons/MicrosoftOdbcDriver17.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #50342      +/-   ##
==========================================
- Coverage   68.18%   68.18%   -0.01%     
==========================================
  Files        3938     3939       +1     
  Lines      251141   251143       +2     
  Branches    13248    13248              
==========================================
+ Hits       171243   171244       +1     
- Misses      64558    64559       +1     
  Partials    15340    15340              
Flag Coverage Δ
frontend 61.30% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kitzy
kitzy marked this pull request as ready for review July 31, 2026 21:25
@kitzy
kitzy requested a review from a team as a code owner July 31, 2026 21:25
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds Microsoft ODBC Driver 17 for SQL Server as a Windows Fleet-maintained app. The change includes Winget metadata, MSI installation and uninstall handling, detection queries, package outputs, catalog registration, and a SoftwarePage icon component with name mapping.

Possibly related PRs

  • fleetdm/fleet#50341: Adds another Windows maintained app with Winget/MSI configuration and catalog integration.
  • fleetdm/fleet#50340: Adds another Windows maintained app with installer metadata, scripts, catalog registration, and an icon mapping.
  • fleetdm/fleet#50313: Adds another Windows maintained app with Winget inputs, PowerShell scripts, generated outputs, and an icon mapping.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR meets the input, identity, validation, and icon criteria, but its exists query omits the required major-version filter. Add AND version LIKE '17.%' to the exists query so Driver 17 and Driver 18 cannot detect each other.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the addition of Microsoft ODBC Driver 17 for SQL Server as a Windows Fleet-maintained app.
Description check ✅ Passed The description documents the issue, implementation, verification details, testing, and important reviewer considerations.
Out of Scope Changes check ✅ Passed The changes support the linked issue by adding the maintained app, installer scripts, metadata, and its icon.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-msodbcsql-17-windows-fma

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json`:
- Line 10: Add a dependencies entry to the microsoft-odbc-driver-17/windows
definition referencing the existing output slug vc-redist-x64/windows, while
preserving default_categories. Regenerate the output after updating the input.

In
`@ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1`:
- Around line 9-12: Update the ArgumentList in the Microsoft ODBC driver
installation command to quote the ${logFile} value passed to the /lv MSI option,
ensuring paths containing spaces remain a single argument while preserving the
existing installer and logging behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0729c232-7b46-4e74-a9cd-cf47ca1ee402

📥 Commits

Reviewing files that changed from the base of the PR and between 2fd2a02 and b903010.

⛔ Files ignored due to path filters (1)
  • website/assets/images/app-icon-microsoft-odbc-driver-17-60x60@2x.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json
  • ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1
  • ee/maintained-apps/outputs/apps.json
  • ee/maintained-apps/outputs/microsoft-odbc-driver-17/windows.json
  • frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver17.tsx
  • frontend/pages/SoftwarePage/components/icons/index.ts

"installer_arch": "x64",
"installer_type": "msi",
"installer_scope": "machine",
"default_categories": ["Developer tools"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 5 '"dependencies"|vc-redist-x64|Microsoft Visual C\+\+ 2015-2022' \
  ee/maintained-apps/inputs/winget ee/maintained-apps/outputs

Repository: fleetdm/fleet

Length of output: 4433


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target input =="
cat -n ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json

echo
echo "== output entry =="
sed -n '8868,8892p' ee/maintained-apps/outputs/apps.json | cat -n

echo
echo "== dependencies examples in Winget inputs =="
python3 - <<'PY'
import json, pathlib
root=pathlib.Path('ee/maintained-apps/inputs/winget')
for p in sorted(root.glob('*.json')):
    try:
        data=json.loads(p.read_text())
    except Exception:
        continue
    deps=data.get('dependencies')
    if deps:
        print(f'{p}: {json.dumps({"name": data.get("name"), "slug": data.get("slug"), "dependencies": deps}, indent=2)}')
PY

Repository: fleetdm/fleet

Length of output: 2206


🌐 Web query:

Microsoft ODBC Driver 17 for SQL Server Windows prerequisites Visual C++ Redistributable x64 2015-2022

💡 Result:

The Microsoft ODBC Driver 17 for SQL Server requires the Microsoft Visual C++ Redistributable to be installed on Windows systems [1]. If this component is not already present, the driver installation may fail or the driver may not load correctly [1]. Regarding the specific version, Microsoft recommends downloading the latest supported version of the Visual C++ Redistributable that matches your system architecture (x64, x86, or ARM64) [1]. The Visual C++ Redistributables from 2015 through 2022 are binary compatible, meaning the latest available Redistributable package (2015-2022) is generally sufficient and recommended to satisfy this requirement [2]. In practice, if you encounter installation errors indicating a missing Visual C++ component, installing the latest "Visual Studio 2015, 2017, 2019, and 2022" Redistributable package from official Microsoft sources will resolve the dependency [1][2]. Key points: - Prerequisite: The driver relies on the Visual C++ runtime libraries [1]. - Compatibility: The 2015-2022 Redistributables are binary compatible; installing the latest version is the standard approach [2]. - Troubleshooting: If the driver fails to install or load, verify the installation of the Redistributable package in your system's Programs and Features [1][3].

Citations:


Add a dependency for the Visual C++ x64 runtime.

microsoft-odbc-driver-17/windows does not declare any dependencies, but ODBC Driver 17 for SQL Server requires the x64 Visual C++ Redistributable. Add a dependencies entry that references the existing output slug vc-redist-x64/windows before regenerating the output.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json` at line 10,
Add a dependencies entry to the microsoft-odbc-driver-17/windows definition
referencing the existing output slug vc-redist-x64/windows, while preserving
default_categories. Regenerate the output after updating the input.

Comment on lines +9 to +12
-ArgumentList "/quiet /norestart /lv ${logFile} /i `"${env:INSTALLER_PATH}`" IACCEPTMSODBCSQLLICENSETERMS=YES" `
-PassThru -Verb RunAs -Wait

Get-Content $logFile -Tail 500

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate and inspect the target script.
if [ -f ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 ]; then
  printf '--- target file outline/contents ---\n'
  cat -n ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1
else
  printf 'target file not found\n'
fi

# Search for logFile definitions/usages in the target path.
printf '\n--- logFile references ---\n'
rg -n 'logFile|TEMP|msiexec|Get-Content' ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 || true

# Behavioral probe: model PowerShell argument splitting for the unquoted MSI /lv path in a non-null process (simulated as whitespace-delimited when passed through cmd.exe, which msiexec receives).
printf '\n--- whitespace-split probe ---\n'
python3 - <<'PY'
examples = [
    "C:\\Users\\Test User\\AppData\\Local\\Temp\\odbc.log",
    "C:\\Windows\\Temp\\odbc.log",
]
for path in examples:
    unquoted = f"/quiet /norestart /lv {path} /i InstallerPath"
    quoted = f'/quiet /norestart /lv "{path}" /i "InstallerPath" IACCEPTMSODBCSQLLICENSETERMS=YES'
    print("path:", path)
    print("  unquoted tokens:", unquoted.split())
    print("  quoted tokens:", quoted.split())
PY

Repository: fleetdm/fleet

Length of output: 242


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate and inspect the target script.
if [ -f ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 ]; then
  echo '--- target file outline/contents ---'
  cat -n ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1
else
  echo 'target file not found'
fi

# Search for logFile definitions/usages in the target path.
echo
echo '--- logFile references ---'
rg -n 'logFile|TEMP|msiexec|Get-Content' ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 || true

# Behavioral probe: model whitespace argument splitting for the unquoted MSI /lv path.
echo
echo '--- whitespace-split probe ---'
python3 - <<'PY'
examples = [
    "C:\\Users\\Test User\\AppData\\Local\\Temp\\odbc.log",
    "C:\\Windows\\Temp\\odbc.log",
]
for path in examples:
    unquoted = f"/quiet /norestart /lv {path} /i InstallerPath"
    quoted = f'/quiet /norestart /lv "{path}" /i "InstallerPath" IACCEPTMSODBCSQLLICENSETERMS=YES'
    print("path:", path)
    print("  unquoted tokens:", unquoted.split())
    print("  quoted tokens:", quoted.split())
PY

Repository: fleetdm/fleet

Length of output: 1945


🌐 Web query:

Microsoft msiexec /l documentation log path spaces must be enclosed in quotes

💡 Result:

When using the msiexec command-line tool, any path that contains spaces, such as a log file path or an installation package path, must be enclosed in quotation marks [1][2][3]. For example, to specify a log file path with spaces, use the following syntax [1][4]: msiexec /i "C:\example.msi" /L*V "C:\path with spaces\package.log" If the path is not enclosed in quotes, the command-line parser will treat the space as a delimiter, causing the command to fail or interpret the remaining parts of the path as additional (and likely incorrect) command-line arguments [5]. Additionally, note that the directory structure for the specified log file path must already exist; the installer will not create the folders for you [6][2]. If the path contains embedded quotation marks, you must use a second pair of quotation marks to escape them within the string [2][7]. When working in environments like PowerShell, you may need to use additional escaping or the stop-parsing symbol (--%) to ensure the quotes are passed correctly to the executable [5].

Citations:


Quote the MSI log path.

When ${env:TEMP} contains spaces, the unquoted ${logFile} is split into multiple MSI arguments, so /lv receives only the first path segment. Pass it as /lv "${logFile}" so msiexec treats the full log file path as one argument.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1`
around lines 9 - 12, Update the ArgumentList in the Microsoft ODBC driver
installation command to quote the ${logFile} value passed to the /lv MSI option,
ensuring paths containing spaces remain a single argument while preserving the
existing installer and logging behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New FMA: Microsoft ODBC Driver 17 for SQL Server

1 participant