changeset 9058:04cb6ac03887

8211106: [windows] Update OS detection code to recognize Windows Server 2019 Reviewed-by: alanb, clanger, bobv
author mbaesken
date Tue, 02 Oct 2018 13:48:08 +0200
parents d626acee4654
children 8119983116f6
files src/os/windows/vm/os_windows.cpp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/windows/vm/os_windows.cpp	Wed Feb 12 23:39:53 2014 +0400
+++ b/src/os/windows/vm/os_windows.cpp	Tue Oct 02 13:48:08 2018 +0200
@@ -1757,7 +1757,13 @@
     if (is_workstation) {
       st->print("10");
     } else {
-      st->print("Server 2016");
+      // distinguish Windows Server 2016 and 2019 by build number
+      // Windows server 2019 GA 10/2018 build number is 17763
+      if (build_number > 17762) {
+        st->print("Server 2019");
+      } else {
+        st->print("Server 2016");
+      }
     }
     break;