Windows context to detect edition (home vs pro etc)
It would be useful to detect the Windows edition as part of the context as those can differ a fair bit in some ways.
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.
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.
Nice, thank you! I was also checking that API but I don't see any mention of Windows 11 there for example.
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