diff --git a/SQLCheck/.vs/SQLCheck/v15/Server/sqlite3/storage.ide b/SQLCheck/.vs/SQLCheck/v15/Server/sqlite3/storage.ide index f889232..524f52a 100644 Binary files a/SQLCheck/.vs/SQLCheck/v15/Server/sqlite3/storage.ide and b/SQLCheck/.vs/SQLCheck/v15/Server/sqlite3/storage.ide differ diff --git a/SQLCheck/SQLCheck/Collectors.cs b/SQLCheck/SQLCheck/Collectors.cs index f2c5703..f442991 100644 --- a/SQLCheck/SQLCheck/Collectors.cs +++ b/SQLCheck/SQLCheck/Collectors.cs @@ -175,6 +175,7 @@ public static void CollectComputer(DataSet ds) DisplayVersion = Utility.RegistryTryGetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DisplayVersion", ""); Computer["WindowsReleaseID"] = releaseID; if (DisplayVersion == "") DisplayVersion = releaseID; // Windows 2022 uses DisplayVersion, Windows 2019 and earlier do not have this, use ReleaseID instead + Computer["WindowsDisplayVersion"] = DisplayVersion; ubr = Utility.RegistryTryGetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "UBR", 0); // UBR = Update Build Revision Computer["WindowsUBR"] = ubr.ToString(); @@ -1460,6 +1461,7 @@ public static void CollectDatabaseDriver(DataSet ds) FileVersionInfo versionInfo = null; string windowsVersion = Computer.GetString("WindowsVersion"); string windowsReleaseID = Computer.GetString("WindowsReleaseID"); + string windowsDisplayVersion = Computer.GetString("WindowsDisplayVersion"); // use instead of ReleaseID for GetDriverInfo call string badPath = ""; foreach (DataRow Provider in OLEDBProviders.Rows) @@ -1500,7 +1502,8 @@ public static void CollectDatabaseDriver(DataSet ds) versionInfo = null; DatabaseDriver["Message"] = badPath + "File not found"; } - info = DriverInfo.GetDriverInfo(Provider["ProgID"].ToString(), versionInfo, windowsVersion, windowsReleaseID); + // info = DriverInfo.GetDriverInfo(Provider["ProgID"].ToString(), versionInfo, windowsVersion, windowsReleaseID); // okay for Win 2019 and prior, need display version for 2022 and later + info = DriverInfo.GetDriverInfo(Provider["ProgID"].ToString(), versionInfo, windowsVersion, windowsDisplayVersion); DatabaseDriver["Version"] = versionInfo == null ? "Unknown" : versionInfo.ProductVersion; DatabaseDriver["TLS12"] = info == null ? "" : info.MinTLS12Version; DatabaseDriver["TLS13"] = info == null ? "" : info.MinTLS13Version; diff --git a/SQLCheck/SQLCheck/DriverInfo.cs b/SQLCheck/SQLCheck/DriverInfo.cs index 7c1a9ad..38e7a79 100644 --- a/SQLCheck/SQLCheck/DriverInfo.cs +++ b/SQLCheck/SQLCheck/DriverInfo.cs @@ -36,7 +36,7 @@ public DriverInfo(string driverName, string driverType, string minTLS12Version, MultiSubnetFailover = multiSubnetFailover; } - public static DriverInfo GetDriverInfo(string driverName, FileVersionInfo versionInfo, string WindowsVersion, string WindowsReleaseID) // TODO - fix up MinTLSVersion and Server Support + public static DriverInfo GetDriverInfo(string driverName, FileVersionInfo versionInfo, string WindowsVersion, string WindowsDisplayVersion) // TODO - fix up MinTLSVersion and Server Support { string TLS12 = "No"; string TLS13 = "No"; @@ -60,7 +60,8 @@ public static DriverInfo GetDriverInfo(string driverName, FileVersionInfo versio { case "SQLOLEDB": case "SQL Server": - switch (WindowsReleaseID.ToUpper()) + // switch (WindowsReleaseID.ToUpper()) // okay for pre-Win 11 or Win 2022 + switch (WindowsDisplayVersion.ToUpper()) { case "": // Windows 8.1/2012 R2 and earlier - Won't fix these versions: Windows 2003, XP, 2008, 2008 R2, 2012 // Windows 8.1 and Windows 2012 R2 = version 6.3.9600 - what build supports the updated DBNETLIB.DLL??? @@ -104,11 +105,15 @@ public static DriverInfo GetDriverInfo(string driverName, FileVersionInfo versio if (Utility.CompareVersion(WindowsVersion, "10.0.19042") == "=" && Utility.CompareVersion(WindowsVersion, "10.0.19042.609") == ">") TLS12 = "Yes"; break; case "21H1": // Windows 10/2019 21H1 ???? build 19043 ???? + case "IRON": // more at https://microsoft.visualstudio.com/OS/_workitems/edit/27324781 + case "21H2": + case "22H2": + case "23H2": + case "24H2": TLS12 = "Yes"; break; - case "IRON": // Windows 10/2019 Iron ???? build 20207???? ???? April 16, 2021???? - // more at https://microsoft.visualstudio.com/OS/_workitems/edit/27324781 - TLS12 = "Yes"; + default: // all versions of Winodws 11 or 2022 or greater support TLS 1.2 + if (Utility.CompareVersion(WindowsVersion, "10.0.19999") == ">") TLS12 = "Yes"; break; } break; diff --git a/SQLCheck/SQLCheck/Properties/AssemblyInfo.cs b/SQLCheck/SQLCheck/Properties/AssemblyInfo.cs index ed75ff6..3114d50 100644 --- a/SQLCheck/SQLCheck/Properties/AssemblyInfo.cs +++ b/SQLCheck/SQLCheck/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1422.0")] -[assembly: AssemblyFileVersion("1.0.1422.0")] +[assembly: AssemblyVersion("1.0.1435.0")] +[assembly: AssemblyFileVersion("1.0.1435.0")] diff --git a/SQLCheck/SQLCheck/Storage.cs b/SQLCheck/SQLCheck/Storage.cs index a7020f2..c3c0f93 100644 --- a/SQLCheck/SQLCheck/Storage.cs +++ b/SQLCheck/SQLCheck/Storage.cs @@ -140,6 +140,7 @@ public static DataSet CreateDataSet(String ComputerName) dt.AddColumn("MinorVersion", "String"); dt.AddColumn("WindowsBuild", "String"); dt.AddColumn("WindowsReleaseID", "String"); + dt.AddColumn("WindowsDisplayVersion", "String"); // in Windows 2022, this is separate from RelaseID, for prior versions, ReleaseID is copied here dt.AddColumn("WindowsUBR", "String"); dt.AddColumn("CLR4Version", "String"); dt.AddColumn("CLR4StrongCrypto", "String");