-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"dart info" reports Windows 11 as Windows 10 #55351
Comments
That line comes from: print('- on ${Platform.operatingSystem} / '
'${Platform.operatingSystemVersion}'); so it's a That code ends up asking the registry for keys from Would you be able to check what your registry reports for those keys? |
cry I understand the version number is still 10, but Windows makes it seem like the name is "Windows 11 Pro". However, the ProductName key here also says "Windows 10 Pro". This seems like a bit of a mess.. why is Windows showing one thing in the system info but the ProductName in the registry is something different? :( |
In the linked post above, it says:
I confirmed that this does return the "expected" value:
|
Agree, the "Caption" entry seems to be the one key that everyone agrees will say "11". |
Not sure what "users" means here. I was thinking that Yes it's a little odd to get "Windows 11 Pro" as the name and "10" as the major version, but that's what Windows itself is showing (so I guess is "correct"). Hopefully this is only being used as an informational string and code isn't being written to behave differently based on the 10 vs 11 difference. I think that also wouldn't require any special cases if/when Windows 12 comes along? |
"Users" here means people reading the registry to get information. If you want to know the major version of the Windows you're running on, there is no field that directly gives you
Still true.) Dart could choose to make |
Ah sorry, I see what you mean. I didn't realise Dart lumped these two things into one string (I misunderstood your How about:
This doesn't break anyone and we have access to both "good" values (name and version). People using the "bad" version are prompted to migrate away and can choose whether to display the marketing name or the version (or both, as Edit: original suggestion was wrong - I realised |
//cc @brianquinlan |
Adding more getters means supporting them on all platforms, so what should the new If There might be something we can return, but it's not clear that there is always a simple and obviously correct answer. |
That's fair, but it seems like these fields are all fairly arbitrary anyway. If the idea is to join these things together into a single string because it's difficult to separate them similarly on different platforms, then I think just updating The docs say not to parse it, and it's already clear that it might return different values in future versions (or even different editions) of Windows. I think anyone making assumptions about it having "Windows 10" in it now (and not handling Windows 11) is probably expecting to have to periodically update their code. |
This also appears to impact our analytics reporting as it's also relying on |
I think I have a solution for this issue with the WMI API |
The output of
dart info
for me includes this:Here's what my system information looks like:
While it's true that Windows 11 still uses 10.x for its version, the name is Windows 11 Pro but Dart reports Windows 10 Pro. This can be confusing to users filing bug reports. I'm not sure where the string "Windows 10 Pro" is coming from, as I only see "Windows 11 Pro" in Windows, and 10 is only in the version number.
The text was updated successfully, but these errors were encountered: