diff --git a/images/windows/scripts/build/Install-SQLOLEDBDriver.ps1 b/images/windows/scripts/build/Install-SQLOLEDBDriver.ps1 index fb5faf261..daeee992d 100644 --- a/images/windows/scripts/build/Install-SQLOLEDBDriver.ps1 +++ b/images/windows/scripts/build/Install-SQLOLEDBDriver.ps1 @@ -3,7 +3,14 @@ ## Desc: Install OLE DB Driver for SQL Server ################################################################################ +# Install OLE DB Driver 18 Install-Binary -Type MSI ` -Url "https://go.microsoft.com/fwlink/?linkid=2242656" ` -ExtraInstallArgs @("ADDLOCAL=ALL", "IACCEPTMSOLEDBSQLLICENSETERMS=YES") ` -ExpectedSubject $(Get-MicrosoftPublisher) + +# Install OLE DB Driver 19 +Install-Binary -Type MSI ` + -Url "https://go.microsoft.com/fwlink/?linkid=2318101" ` + -ExtraInstallArgs @("ADDLOCAL=ALL", "IACCEPTMSOLEDBSQLLICENSETERMS=YES") ` + -ExpectedSubject $(Get-MicrosoftPublisher) diff --git a/images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1 index 59bf80543..3dc19960f 100644 --- a/images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -191,7 +191,8 @@ $databaseTools = $installedSoftware.AddHeader("Database tools") $databaseTools.AddToolVersion("Azure CosmosDb Emulator", $(Get-AzCosmosDBEmulatorVersion)) $databaseTools.AddToolVersion("DacFx", $(Get-DacFxVersion)) $databaseTools.AddToolVersion("MySQL", $(Get-MySQLVersion)) -$databaseTools.AddToolVersion("SQL OLEDB Driver", $(Get-SQLOLEDBDriverVersion)) +$databaseTools.AddToolVersion("SQL OLEDB Driver 18", $(Get-SQLOLEDBDriver18Version)) +$databaseTools.AddToolVersion("SQL OLEDB Driver 19", $(Get-SQLOLEDBDriver19Version)) $databaseTools.AddToolVersion("SQLPS", $(Get-SQLPSVersion)) $databaseTools.AddToolVersion("MongoDB Shell (mongosh)", $(Get-MongoshVersion)) diff --git a/images/windows/scripts/docs-gen/SoftwareReport.Tools.psm1 b/images/windows/scripts/docs-gen/SoftwareReport.Tools.psm1 index 7bb2ec9d5..532dd52eb 100644 --- a/images/windows/scripts/docs-gen/SoftwareReport.Tools.psm1 +++ b/images/windows/scripts/docs-gen/SoftwareReport.Tools.psm1 @@ -121,11 +121,16 @@ function Get-MySQLVersion { return $mysqlVersion } -function Get-SQLOLEDBDriverVersion { +function Get-SQLOLEDBDriver18Version { $SQLOLEDBDriverVersion = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLEDBSQL' InstalledVersion).InstalledVersion return $SQLOLEDBDriverVersion } +function Get-SQLOLEDBDriver19Version { + $SQLOLEDBDriverVersion = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLEDBSQL19' InstalledVersion).InstalledVersion + return $SQLOLEDBDriverVersion +} + function Get-MercurialVersion { ($(hg --version) | Out-String) -match "version (?\d+\.\d+\.?\d*)" | Out-Null $mercurialVersion = $Matches.Version diff --git a/images/windows/scripts/tests/Tools.Tests.ps1 b/images/windows/scripts/tests/Tools.Tests.ps1 index 652d3aa1f..66caa076d 100644 --- a/images/windows/scripts/tests/Tools.Tests.ps1 +++ b/images/windows/scripts/tests/Tools.Tests.ps1 @@ -213,9 +213,13 @@ Describe "Kotlin" { } Describe "SQL OLEDB Driver" { - It "SQL OLEDB Driver" { + It "SQL OLEDB Driver 18" { "HKLM:\SOFTWARE\Microsoft\MSOLEDBSQL" | Should -Exist } + + It "SQL OLEDB Driver 19" { + "HKLM:\SOFTWARE\Microsoft\MSOLEDBSQL19" | Should -Exist + } } Describe "OpenSSL" {