Blog

Microsoft Windows 8.1 breaks version API.

April 2nd, 2014 by Alex Riedel
 

If we need to check what Windows version a PowerShell script run on, we usually use a statement like this:

Shell

So imagine our surprise when we saw what happens when you run this as a script in PrimalScript:

PrimalScript

Instead of reporting the actual Windows version, it appears as if we are running in Windows 8 instead of 8.1
To make sure we didn’t have a glitch in PrimalScript (and because we didn’t quite trust our eyes), we packaged the script as an executable and ran that.

 

Packaged

Same result, it reports the incorrect version number.

According to Microsoft this is intentional:

http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074(v=vs.85).aspx

Before you ask, we have no idea what could possibly possess Microsoft to break such a fundamental API call so that it reports an incorrect version.

As shown on the web page we linked to above, you have to tag your executable in a manifest as supporting Windows 8.1 in order to get a correct version number.

Custom manifest

In the packager settings you have to switch to a custom manifest and and specify the manifest file.

Settings

If you follow this patch and re-package the executable it will now report the correct version number.

With Manifest

Needless to say, we will update our default manifest and the packager to accommodate this latest “it’s not a bug, it’s a feature” play by Microsoft in the next service build.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Technorati Tags: , , , , , ,

Tags: , , , , , ,

%d bloggers like this: