diff --git a/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json b/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json new file mode 100644 index 0000000000..e40ddec1ce --- /dev/null +++ b/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-17.json @@ -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"] +} diff --git a/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 b/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 new file mode 100644 index 0000000000..8bac7607b1 --- /dev/null +++ b/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_17_install.ps1 @@ -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 +} diff --git a/ee/maintained-apps/outputs/apps.json b/ee/maintained-apps/outputs/apps.json index 34e56fbd66..9ca9453068 100644 --- a/ee/maintained-apps/outputs/apps.json +++ b/ee/maintained-apps/outputs/apps.json @@ -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", diff --git a/ee/maintained-apps/outputs/microsoft-odbc-driver-17/windows.json b/ee/maintained-apps/outputs/microsoft-odbc-driver-17/windows.json new file mode 100644 index 0000000000..a1c36a9caa --- /dev/null +++ b/ee/maintained-apps/outputs/microsoft-odbc-driver-17/windows.json @@ -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" + } +} diff --git a/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver17.tsx b/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver17.tsx new file mode 100644 index 0000000000..c53fe89818 --- /dev/null +++ b/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver17.tsx @@ -0,0 +1,14 @@ +import * as React from "react"; + +import type { SVGProps } from "react"; + +const MicrosoftOdbcDriver17 = (props: SVGProps) => ( + + + +); +export default MicrosoftOdbcDriver17; diff --git a/frontend/pages/SoftwarePage/components/icons/index.ts b/frontend/pages/SoftwarePage/components/icons/index.ts index 4aa9b0f9cc..a8ea6fbce8 100644 --- a/frontend/pages/SoftwarePage/components/icons/index.ts +++ b/frontend/pages/SoftwarePage/components/icons/index.ts @@ -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, diff --git a/website/assets/images/app-icon-microsoft-odbc-driver-17-60x60@2x.png b/website/assets/images/app-icon-microsoft-odbc-driver-17-60x60@2x.png new file mode 100644 index 0000000000..530593b732 Binary files /dev/null and b/website/assets/images/app-icon-microsoft-odbc-driver-17-60x60@2x.png differ