Skip to content
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 context to detect edition (home vs pro etc) #730

Open
thomaseizinger opened this issue Feb 2, 2025 · 4 comments
Open

Windows context to detect edition (home vs pro etc) #730

thomaseizinger opened this issue Feb 2, 2025 · 4 comments
Labels
area: core Core features of the SDK SDK parity Behavior that other SDKs provide and we are missing or implement differently

Comments

@thomaseizinger
Copy link
Contributor

It would be useful to detect the Windows edition as part of the context as those can differ a fair bit in some ways.

@lcian lcian added enhancement Request for improving an existing feature and removed enhancement Request for improving an existing feature labels Feb 2, 2025
@lcian
Copy link
Member

lcian commented Feb 2, 2025

This would likely require using the Windows API directly, as I don't see a way to retrieve this information with os_info (the crate we're currently using to get the version) or other crates.

@thomaseizinger
Copy link
Contributor Author

Yep, it is one system-call away! https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo

I'll see if I can draft a PR for this.

@lcian
Copy link
Member

lcian commented Feb 3, 2025

Nice, thank you!
I was also checking that API but I don't see any mention of Windows 11 there for example.

@thomaseizinger
Copy link
Contributor Author

The version is covered already by the build number! Windows 10.0.26100 is for example (confusingly) Windows 11. The only missing bit is Home, Pro, Ultimate etc

@lcian lcian added the SDK parity Behavior that other SDKs provide and we are missing or implement differently label Mar 6, 2025
@lcian lcian added the area: core Core features of the SDK label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Core features of the SDK SDK parity Behavior that other SDKs provide and we are missing or implement differently
Projects
None yet
Development

No branches or pull requests

2 participants