Fix Windows 11 OS detection and Windows Server compatibility in validation reports#297
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Co-authored-by: Yuri05 <25061876+Yuri05@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Yuri05 <25061876+Yuri05@users.noreply.github.com>
Fixed the Windows Server compatibility issue by adding a check to exclude server editions from the Windows 11 detection logic. Windows Server 2022+ will now correctly report as "Windows Server" instead of being misidentified as "Windows 11". Commit: 53aa015 |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes OS detection issues in the Installation Validator where Windows 11 systems were incorrectly reported as "Windows 10" and introduces proper Windows Server compatibility. The fix enhances the OS detection logic to use build numbers for accurate Windows 11 identification while preserving correct behavior for Windows Server editions.
- Enhanced Windows 11 detection using build number 22000+ threshold
- Added Windows Server edition exclusion to prevent misidentification
- Integrated DisplayVersion registry value for accurate Windows 11 version reporting
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
The Installation Validator was incorrectly reporting Windows 11 systems as "Windows 10" in validation reports, and the initial fix introduced a regression where Windows Server 2022+ systems would be misidentified as "Windows 11".
Root Cause
The OS detection logic only read the "ProductName" registry key, which on Windows 11 systems often still reports "Windows 10" for backward compatibility reasons. Additionally, Windows Server 2022+ uses the same build numbers (22000+) as Windows 11, making simple build number detection insufficient.
Solution
Enhanced the
FriendlyNameproperty inOperatingSystemInfo.csto properly detect Windows 11 while maintaining Windows Server compatibility:DisplayVersionregistry value for accurate Windows 11 version detailsExample Behavior
Before:
After:
The fix uses Microsoft's official build number threshold while properly distinguishing between client and server Windows editions.
Fixes #254.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.