Tuesday 5 November 2013

GetVersionEx won’t help you now!

If like me, you’ve built some crash handling code into your app so you can find out where your application is crashing in the wild, and find that WER isn’t the most effective way to get your crash dumps, you might be in for a suprise.

Since the Windows 8.1 update, you’ll no longer be able to find any machines that run a version later than Windows 8?

Why?  Because of this change they made on Windows 8.1.  Apparently, since we developers can’t be trusted to get version checks right, they’ve deprecated GetVersionEx, and to add insult to injury, make it lie and claim that it’s only Windows 8.

So, if you want to retarget for Windows 8.1, and actually find out what version it is, you’ll need to add this to your app manifest.

<!-- Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>

along with all the previous versions.

I wonder if 8.2 or whatever will lie, and say it’s 8.1 without the correct manifest too?

No comments:

Post a Comment