Skip Menu |

This queue is for tickets about the Win32 CPAN distribution.

Report information
The Basics
Id: 90807
Status: new
Priority: 0/
Queue: Win32

People
Owner: Nobody in particular
Requestors: Thoke [...] northpeak.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.48
Fixed in: (no value)



Subject: Win32::GetOSVersion() broken in Windows 8.1 and Windows Server 2012 R2
From Microsoft: In Windows 8.1, the GetVersion(Ex) APIs have been deprecated. That means that while you can still call the APIs, if your app does not specifically target Windows 8.1, you will get Windows 8 versioning (6.2.0.0). Here are just a few resources: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074(v=vs.85).aspx This can be seen in practice on Windows Server 2012 R2 with Win32 vs Win32::OLE as follows: --- use Win32; use Win32::OLE; my ( $desc, $major, $minor, $build, $id, undef, undef, $suitemask, $producttype ) = Win32::GetOSVersion(); printf "%20s: %10s\n", "Win32 Version", "$major.$minor.$build"; my $wmi = Win32::OLE->GetObject( "WinMgmts://./root/cimv2" ) or die "Failed GetObject: $!\n"; my $list = $wmi->InstancesOf( "Win32_OperatingSystem" ) or die "Failed InstancesOf: $!\n"; for my $item ( Win32::OLE::in $list ) { printf "%20s: %10s\n", "Win32::OLE Version", $item->{Version}; } --- Win32 Version: 6.2.9200 Win32::OLE Version: 6.3.9600