diff --git a/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-18.json b/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-18.json new file mode 100644 index 0000000000..3edb77bf6b --- /dev/null +++ b/ee/maintained-apps/inputs/winget/microsoft-odbc-driver-18.json @@ -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"] +} diff --git a/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_18_install.ps1 b/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_18_install.ps1 new file mode 100644 index 0000000000..8bac7607b1 --- /dev/null +++ b/ee/maintained-apps/inputs/winget/scripts/microsoft_odbc_driver_18_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 aaea151904..06c5533efb 100644 --- a/ee/maintained-apps/outputs/apps.json +++ b/ee/maintained-apps/outputs/apps.json @@ -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", diff --git a/ee/maintained-apps/outputs/microsoft-odbc-driver-18/windows.json b/ee/maintained-apps/outputs/microsoft-odbc-driver-18/windows.json new file mode 100644 index 0000000000..718531e3c6 --- /dev/null +++ b/ee/maintained-apps/outputs/microsoft-odbc-driver-18/windows.json @@ -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" + } +} diff --git a/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver18.tsx b/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver18.tsx new file mode 100644 index 0000000000..c11485973f --- /dev/null +++ b/frontend/pages/SoftwarePage/components/icons/MicrosoftOdbcDriver18.tsx @@ -0,0 +1,14 @@ +import * as React from "react"; + +import type { SVGProps } from "react"; + +const MicrosoftOdbcDriver18 = (props: SVGProps) => ( + + + +); +export default MicrosoftOdbcDriver18; diff --git a/frontend/pages/SoftwarePage/components/icons/index.ts b/frontend/pages/SoftwarePage/components/icons/index.ts index ba300231d2..7aeff9c3ef 100644 --- a/frontend/pages/SoftwarePage/components/icons/index.ts +++ b/frontend/pages/SoftwarePage/components/icons/index.ts @@ -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, diff --git a/website/assets/images/app-icon-microsoft-odbc-driver-18-60x60@2x.png b/website/assets/images/app-icon-microsoft-odbc-driver-18-60x60@2x.png new file mode 100644 index 0000000000..530593b732 Binary files /dev/null and b/website/assets/images/app-icon-microsoft-odbc-driver-18-60x60@2x.png differ