@@ -292,7 +292,7 @@ sub GetOSDisplayName {
292
292
$desc =~ s / ^\s *// ;
293
293
s / (200.)/ $name Server $1 / ;
294
294
}
295
- s / ^Windows (200[38] )/ Windows Server $1 / ;
295
+ s / ^Windows (20(03|08|12) )/ Windows Server $1 / ;
296
296
}
297
297
}
298
298
$name .= " $desc " if length $desc ;
@@ -460,8 +460,16 @@ sub _GetOSName {
460
460
$desc = " R2" ;
461
461
}
462
462
}
463
+ elsif ($minor == 2) {
464
+ if ($producttype == VER_NT_WORKSTATION) {
465
+ $os = " 8" ;
466
+ }
467
+ else {
468
+ $os = " 2012" ;
469
+ }
470
+ }
463
471
464
- if ($productinfo == PRODUCT_ULTIMATE) {
472
+ if ($productinfo == PRODUCT_ULTIMATE) {
465
473
$desc .= " Ultimate" ;
466
474
}
467
475
elsif ($productinfo == PRODUCT_HOME_PREMIUM) {
@@ -970,6 +978,8 @@ Currently known values for ID MAJOR and MINOR are as follows:
970
978
Windows Server 2008 2 6 0
971
979
Windows 7 2 6 1
972
980
Windows Server 2008 R2 2 6 1
981
+ Windows 8 2 6 2
982
+ Windows Server 2012 2 6 2
973
983
974
984
On Windows NT 4 SP6 and later this function returns the following
975
985
additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
@@ -986,6 +996,10 @@ The version numbers for Windows 7 and Windows Server 2008 R2 are
986
996
identical; the PRODUCTTYPE field must be used to differentiate between
987
997
them.
988
998
999
+ The version numbers for Windows 8 and Windows Server 2012 are
1000
+ identical; the PRODUCTTYPE field must be used to differentiate between
1001
+ them.
1002
+
989
1003
SPMAJOR and SPMINOR are are the version numbers of the latest
990
1004
installed service pack.
991
1005
@@ -1016,9 +1030,9 @@ constants.
1016
1030
PRODUCTTYPE provides additional information about the system. It should
1017
1031
be one of the following integer values:
1018
1032
1019
- 1 - Workstation (NT 4, 2000 Pro, XP Home, XP Pro, Vista)
1033
+ 1 - Workstation (NT 4, 2000 Pro, XP Home, XP Pro, Vista, etc )
1020
1034
2 - Domaincontroller
1021
- 3 - Server (2000 Server, Server 2003, Server 2008)
1035
+ 3 - Server (2000 Server, Server 2003, Server 2008, etc )
1022
1036
1023
1037
Note that a server that is also a domain controller is reported as
1024
1038
PRODUCTTYPE 2 (Domaincontroller) and not PRODUCTTYPE 3 (Server).
0 commit comments