[issue19143] Finding the Windows version getting messier

Martin v. Löwis report at bugs.python.org
Wed Oct 2 15:58:43 CEST 2013


Martin v. Löwis added the comment:

tim.peters: looking at the implementation of the proposed annoying functions with names like IsWindows8Point1OrGreater, it turns out that they all go back to VerifyVersionInfoW, which is available since W2k (but still doesn't tell the actual version).

tim.golden: a work-around is documented in 

http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx

Put

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

into the manifest of python.exe, and it should report the correct version. Of course

a) this would fail for somebody embedding Python (unless they have that in their exe's manifest), and
b) we don't know the Id of upcoming windows versions, so the binaries produced today might still lie on future Windows releases.

It seems possible to query the compatibility using QueryActCtxW and CompatibilityInformationInActivationContext, but I couldn't find a way to put the compatibility into a new activation context (which would allow to claim compatibility dynamically).

----------
nosy: +loewis

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19143>
_______________________________________


More information about the Python-bugs-list mailing list