@@ -174,6 +174,7 @@ sub VER_SUITE_STORAGE_SERVER () { 0x00002000 } # Windows Storage Serve
174
174
sub VER_SUITE_TERMINAL () { 0x00000010 } # Terminal Services is installed. This value is always set.
175
175
# If VER_SUITE_TERMINAL is set but VER_SUITE_SINGLEUSERTS is not set, the system is running in application server mode.
176
176
sub VER_SUITE_WH_SERVER () { 0x00008000 } # Windows Home Server is installed.
177
+ sub VER_SUITE_MULTIUSERTS () { 0x00020000 } # AppServer mode is enabled.
177
178
178
179
179
180
sub SM_TABLETPC () { 86 }
@@ -359,7 +360,8 @@ sub GetOSDisplayName {
359
360
$desc =~ s / ^\s *// ;
360
361
s / (200.)/ $name Server $1 / ;
361
362
}
362
- s / ^Windows (20(03|08|12))/ Windows Server $1 / ;
363
+ s / ^Windows (20(03|08|12|16|19))/ Windows Server $1 / ;
364
+ s / ^Windows SAC/ Windows Server/ ;
363
365
}
364
366
}
365
367
$name .= " $desc " if length $desc ;
@@ -544,10 +546,44 @@ sub _GetOSName {
544
546
$desc = " R2" ;
545
547
}
546
548
}
547
- }
549
+ }
548
550
elsif ($major == 10) {
551
+ if ($producttype == VER_NT_WORKSTATION) {
549
552
$os = ' 10' ;
553
+ if ($build == 10240) {
554
+ $desc = " , version 1507 (RTM)" ;
555
+ } elsif ($build == 14393) {
556
+ $desc = " , version 1607" ;
557
+ } elsif ($build == 15063) {
558
+ $desc = " , version 1703" ;
559
+ } elsif ($build == 16299) {
560
+ $desc = " , version 1709" ;
561
+ } elsif ($build == 17134) {
562
+ $desc = " , version 1803" ;
563
+ } elsif ($build == 17763) {
564
+ $desc = " , version 1809" ;
565
+ } else {
566
+ $desc = " , version <unknown>" ;
567
+ }
568
+ } else {
569
+ if ($build == 14393) {
570
+ $os = " 2016" ;
571
+ $build = " , version 1607" ;
572
+ } elsif ($build == 17763) {
573
+ $os = " 2019" ;
574
+ $build = " , version 1809" ;
575
+ } else {
576
+ $os = " SAC" ;
577
+ if ($build == 16299) {
578
+ $desc = " , version 1709" ;
579
+ } elsif ($build == 17134) {
580
+ $desc = " , version 1803" ;
581
+ } else {
582
+ $desc = " , version <unknown>" ;
583
+ }
584
+ }
550
585
}
586
+ }
551
587
552
588
if ($major >= 6) {
553
589
if ($productinfo == PRODUCT_ULTIMATE) {
@@ -998,6 +1034,10 @@ GetOSVersion() in list context.
998
1034
The description will also include tags for other special editions,
999
1035
like "R2", "Media Center", "Tablet PC", or "Starter Edition".
1000
1036
1037
+ In the Windows 10 / Server Semi-Annual Channel era, the description may
1038
+ contain the relevant ReleaseId value, but this is only inferred from
1039
+ the build number, not determined absolutely.
1040
+
1001
1041
Currently the possible values for the OS name are
1002
1042
1003
1043
WinWin32s
@@ -1013,6 +1053,12 @@ Currently the possible values for the OS name are
1013
1053
WinVista
1014
1054
Win2008
1015
1055
Win7
1056
+ Win8
1057
+ Win8.1
1058
+ Win10
1059
+ Win2016
1060
+ Win2019
1061
+ WinSAC
1016
1062
1017
1063
This routine is just a simple interface into GetOSVersion(). More
1018
1064
specific or demanding situations should use that instead. Another
@@ -1038,30 +1084,36 @@ For the ID, the values are 0 for Win32s, 1 for Windows 9X/Me and 2 for
1038
1084
Windows NT/2000/XP/2003/Vista/2008/7. In scalar context it returns just
1039
1085
the ID.
1040
1086
1041
- Currently known values for ID MAJOR and MINOR are as follows:
1042
-
1043
- OS ID MAJOR MINOR
1044
- Win32s 0 - -
1045
- Windows 95 1 4 0
1046
- Windows 98 1 4 10
1047
- Windows Me 1 4 90
1048
-
1049
- Windows NT 3.51 2 3 51
1050
- Windows NT 4 2 4 0
1051
-
1052
- Windows 2000 2 5 0
1053
- Windows XP 2 5 1
1054
- Windows Server 2003 2 5 2
1055
- Windows Server 2003 R2 2 5 2
1056
- Windows Home Server 2 5 2
1057
-
1058
- Windows Vista 2 6 0
1059
- Windows Server 2008 2 6 0
1060
- Windows 7 2 6 1
1061
- Windows Server 2008 R2 2 6 1
1062
- Windows 8 2 6 2
1063
- Windows Server 2012 2 6 2
1064
-
1087
+ Currently known values for ID MAJOR MINOR and BUILD are as follows:
1088
+
1089
+ OS ID MAJOR MINOR BUILD
1090
+ Win32s 0 - - -
1091
+ Windows 95 1 4 0 -
1092
+ Windows 98 1 4 10 -
1093
+ Windows Me 1 4 90 -
1094
+
1095
+ Windows NT 3.51 2 3 51 -
1096
+ Windows NT 4 2 4 0 -
1097
+
1098
+ Windows 2000 2 5 0 -
1099
+ Windows XP 2 5 1 -
1100
+ Windows Server 2003 2 5 2 -
1101
+ Windows Server 2003 R2 2 5 2 -
1102
+ Windows Home Server 2 5 2 -
1103
+
1104
+ Windows Vista 2 6 0 -
1105
+ Windows Server 2008 2 6 0 -
1106
+ Windows 7 2 6 1 -
1107
+ Windows Server 2008 R2 2 6 1 -
1108
+ Windows 8 2 6 2 -
1109
+ Windows Server 2012 2 6 2 -
1110
+ Windows 8.1 2 6 2 -
1111
+ Windows Server 2012 R2 2 6 2 -
1112
+
1113
+ Windows 10 2 10 0 -
1114
+ Windows Server 2016 2 10 0 14393
1115
+ Windows Server 2019 2 10 0 17677
1116
+
1065
1117
On Windows NT 4 SP6 and later this function returns the following
1066
1118
additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
1067
1119
@@ -1081,8 +1133,14 @@ The version numbers for Windows 8 and Windows Server 2012 are
1081
1133
identical; the PRODUCTTYPE field must be used to differentiate between
1082
1134
them.
1083
1135
1136
+ For modern Windows releases, the major and minor version numbers are
1137
+ identical. The PRODUCTTYPE field must be used to differentiate between
1138
+ Windows 10 and Server releases. The BUILD field is used to
1139
+ differentiate Windows Server versions: currently 2016, 2019, and
1140
+ Semi-Annual Channel releases.
1141
+
1084
1142
SPMAJOR and SPMINOR are the version numbers of the latest
1085
- installed service pack.
1143
+ installed service pack. (In the Windows 10 era, these are unused.)
1086
1144
1087
1145
SUITEMASK is a bitfield identifying the product suites available on
1088
1146
the system. Known bits are:
@@ -1103,6 +1161,7 @@ the system. Known bits are:
1103
1161
VER_SUITE_STORAGE_SERVER 0x00002000
1104
1162
VER_SUITE_COMPUTE_SERVER 0x00004000
1105
1163
VER_SUITE_WH_SERVER 0x00008000
1164
+ VER_SUITE_MULTIUSERTS 0x00020000
1106
1165
1107
1166
The VER_SUITE_xxx names are listed here to cross reference the Microsoft
1108
1167
documentation. The Win32 module does not provide symbolic names for these
0 commit comments