Add Microsoft ODBC Driver 18 for SQL Server as a Windows Fleet-maintained app (#50348)
**Related issue:** Resolves #50327 Adds Microsoft ODBC Driver 18 for SQL Server as a Windows Fleet-maintained app, from winget `Microsoft.msodbcsql.18` (18.6.2.1, MSI, machine scope, x64, en-US). Sibling of #50342 (driver 17); the two install side by side and are separate products. ## Verification Identity read from the MSI Property table: ``` ProductName Microsoft ODBC Driver 18 for SQL Server Manufacturer Microsoft Corporation ProductCode {820A3DEC-9783-42AE-B12D-750FCCF07E10} UpgradeCode {ADA68B65-BFF8-4E6A-B082-CC6682D425B8} ALLUSERS 1 ``` - Installer SHA confirmed against a local download (`20314529…4b82`). - The UpgradeCode differs from driver 17's (`{0123A210-…}`), which confirms they are independent products rather than upgrades of one another. The generated uninstall script picked up 18's, so uninstalling one will not touch the other. - Because `ProductName` already carries the major version, the exists query is a simple equality — no `version LIKE '18.%'` pinning needed, and no risk of 17 and 18 matching each other. Like driver 17, the MSI refuses to install without `IACCEPTMSODBCSQLLICENSETERMS=YES`, which Fleet's default MSI script does not pass, so this ships a small custom install script. It is deliberately a **separate file** from driver 17's rather than a shared path, following the repo's one-script-per-app convention and keeping the two PRs independently mergeable. The icon comes from the MSI's own `ARPPRODUCTICON` stream. As with #50342 it is natively 32×32, so the 128×128 asset is an upscale — happy to drop it in favour of the generic fallback if reviewers prefer. The icon map key also needed the same manual correction (the generator derives it from the slug, which omits "for sql server"). The manifest declares a `Microsoft.VCRedist.2015+.x64` dependency, which the ingester ignores; we ship `vc-redist-x64/windows` and the redistributable is present on most hosts. # 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 18 for SQL Server to the maintained Windows software catalog. * Added support for version 18.6.2.1, including installation, upgrade, uninstall, detection, and license acceptance handling. * Added the software’s icon and catalog display details. * Included support for SQL Server and Azure SQL connectivity scenarios. * Installation now provides appropriate handling for successful completion, restart requirements, and installation failures. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Allen Houchins <allenhouchins@mac.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Microsoft ODBC Driver 18 for SQL Server",
|
||||
"slug": "microsoft-odbc-driver-18/windows",
|
||||
"package_identifier": "Microsoft.msodbcsql.18",
|
||||
"unique_identifier": "Microsoft ODBC Driver 18 for SQL Server",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_18_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
|
||||
}
|
||||
@@ -5461,6 +5461,13 @@
|
||||
"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 ODBC Driver 18 for SQL Server",
|
||||
"slug": "microsoft-odbc-driver-18/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Microsoft ODBC Driver 18 for SQL Server",
|
||||
"description": "Microsoft ODBC Driver 18 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": "18.6.2.1",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Microsoft ODBC Driver 18 for SQL Server' AND publisher = 'Microsoft Corporation';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Microsoft ODBC Driver 18 for SQL Server' AND publisher = 'Microsoft Corporation' AND version_compare(version, '18.6.2.1') < 0);"
|
||||
},
|
||||
"installer_url": "https://download.microsoft.com/download/7bf9fad4-0f21-486d-a750-fc990ded5624/amd64/1033/msodbcsql.msi",
|
||||
"install_script_ref": "5a2f9a9f",
|
||||
"uninstall_script_ref": "28feb158",
|
||||
"sha256": "20314529110da3365a252164a657bdc837a18be5839105aa5f5acf0a8d2f4b82",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
],
|
||||
"upgrade_code": "{ADA68B65-BFF8-4E6A-B082-CC6682D425B8}"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"28feb158": "# 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('{ADA68B65-BFF8-4E6A-B082-CC6682D425B8}')) {\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",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -646,6 +646,7 @@ import MicrosoftAzureStorageExplorer from "./MicrosoftAzureStorageExplorer";
|
||||
import MicrosoftDotnetRuntime from "./MicrosoftDotnetRuntime";
|
||||
import MicrosoftEdge from "./MicrosoftEdge";
|
||||
import MicrosoftOdbcDriver17 from "./MicrosoftOdbcDriver17";
|
||||
import MicrosoftOdbcDriver18 from "./MicrosoftOdbcDriver18";
|
||||
import MicrosoftOffice from "./MicrosoftOffice";
|
||||
import MicrosoftOneNote from "./MicrosoftOneNote";
|
||||
import MicrosoftOutlook from "./MicrosoftOutlook";
|
||||
@@ -1804,6 +1805,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
"microsoft edge": Edge,
|
||||
"microsoft excel": Excel,
|
||||
"microsoft odbc driver 17 for sql server": MicrosoftOdbcDriver17,
|
||||
"microsoft odbc driver 18 for sql server": MicrosoftOdbcDriver18,
|
||||
"microsoft office": MicrosoftOffice,
|
||||
"microsoft onenote": MicrosoftOneNote,
|
||||
"microsoft outlook": MicrosoftOutlook,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
Reference in New Issue
Block a user