require DynaLoader;
@ISA = qw|Exporter DynaLoader|;
- $VERSION = '0.45';
+ $VERSION = '0.46';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
$desc =~ s/^\s*//;
s/(200.)/$name Server $1/;
}
- s/^Windows (200[38])/Windows Server $1/;
+ s/^Windows (20(03|08|12))/Windows Server $1/;
}
}
$name .= " $desc" if length $desc;
$desc = "R2";
}
}
+ elsif ($minor == 2) {
+ if ($producttype == VER_NT_WORKSTATION) {
+ $os = "8";
+ }
+ else {
+ $os = "2012";
+ }
+ }
- if ($productinfo == PRODUCT_ULTIMATE) {
+ if ($productinfo == PRODUCT_ULTIMATE) {
$desc .= " Ultimate";
}
elsif ($productinfo == PRODUCT_HOME_PREMIUM) {
Windows Server 2008 2 6 0
Windows 7 2 6 1
Windows Server 2008 R2 2 6 1
+ Windows 8 2 6 2
+ Windows Server 2012 2 6 2
On Windows NT 4 SP6 and later this function returns the following
additional values: SPMAJOR, SPMINOR, SUITEMASK, PRODUCTTYPE.
identical; the PRODUCTTYPE field must be used to differentiate between
them.
+The version numbers for Windows 8 and Windows Server 2012 are
+identical; the PRODUCTTYPE field must be used to differentiate between
+them.
+
SPMAJOR and SPMINOR are are the version numbers of the latest
installed service pack.
PRODUCTTYPE provides additional information about the system. It should
be one of the following integer values:
- 1 - Workstation (NT 4, 2000 Pro, XP Home, XP Pro, Vista)
+ 1 - Workstation (NT 4, 2000 Pro, XP Home, XP Pro, Vista, etc)
2 - Domaincontroller
- 3 - Server (2000 Server, Server 2003, Server 2008)
+ 3 - Server (2000 Server, Server 2003, Server 2008, etc)
Note that a server that is also a domain controller is reported as
PRODUCTTYPE 2 (Domaincontroller) and not PRODUCTTYPE 3 (Server).
["7 [Enterprise]", "7", 2, 6, 1, 0x04 ],\r
["7 [Ultimate]", "7", 2, 6, 1, 0x01 ],\r
\r
-\r
+["8", "8", 2, 6, 2 ],\r
["2008 [R2]", "2008", 2, 6, 1, 0x00, 2, 89 ],\r
+["2012", "2012", 2, 6, 2, 0x00, 2, 89 ],\r
["[Small Business Server] 2008 R2", "2008", 2, 6, 1, 0x09, 2, 89 ],\r
\r
);\r
# and 2003/2008 start with "Windows Server"\r
unless ($pretty eq "Win32s") {\r
my $prefix = "Windows";\r
- $prefix .= " Server" if $pretty =~ /^200[38]/;\r
+ $prefix .= " Server" if $pretty =~ /^20(03|08|12)/;\r
$pretty = "$prefix $pretty";\r
}\r
\r