-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows version detect issue #5
Comments
Yeah, this is an interesting issue ... I don't know if this helps any: http://stackoverflow.com/questions/9817160/getversionex-under-windows-8 Perhaps, |
There are a bunch of new macros from MSDN that are preferable way to get version information in new SDK: |
Some of this new macros has issues. New macros, immediately new bugs :| To get IsWindows8Point1OrGreater() or IsWindows10OrGreater() working the module needs a manifest included. Btw: I have installed SDK 8.1 but IsWindows10OrGreater() is not included in my VersionHelpers.h. As mentioned by Ehsan A Samani in an article on CodeProject (http://www.codeproject.com/Articles/678606/Part1-Overcoming-Windows-8-1s-deprecation-of-GetVe#Update) the old but not deprecated function NetWkstaGetInfo() can also be used to get major and minor version. I'm not sure how to distinguish then between workstation and server. |
Of course, it is by design and not a bug. Windows 10 compatible applications must include the manifest so the OS can differentiate the compatibility behavior. If an app doesn't have the manifest, it shouldn't know anything about new OS.
Because you need SDK 10 for this to be available. |
I've also made a Win-version (+ServPack+build-number) retriever where I compare the |
@gvanem could you clarify the licence for |
@bchavez I've not thought of it, but a MIT License is fine. |
For people who search how to setup a manifest, just add this file in the project who use BugTrap. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="YOURAPPNAME"
version="1.0.0.0"
type="win32" />
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 & 11 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
</assembly> |
CSymEngine::GetOsInfo(COsInfo& rOsInfo)
uses deprecated GetVersionEx API. Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2).We need to find out better way to get windows version, including real major/minor versions, product type, etc.
For a workaround, I just take kernel32.dll version: GoldRenard@ab26428 In this way we don't know the real product type, so we can't detect is it server OS or client.
The text was updated successfully, but these errors were encountered: