Skip to content

Fix Windows 11 OS detection and Windows Server compatibility in validation reports - #297

Closed
Yuri05 with Copilot wants to merge 3 commits into
developfrom
copilot/fix-254
Closed

Fix Windows 11 OS detection and Windows Server compatibility in validation reports#297
Yuri05 with Copilot wants to merge 3 commits into
developfrom
copilot/fix-254

Conversation

Copilot AI commented Sep 1, 2025

Copy link
Copy Markdown

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 FriendlyName property in OperatingSystemInfo.cs to properly detect Windows 11 while maintaining Windows Server compatibility:

  1. Windows 11 Detection: Uses build number 22000+ to identify Windows 11 systems
  2. Server Edition Handling: Excludes Windows Server editions from Windows 11 detection logic
  3. Version Information: Uses DisplayVersion registry value for accurate Windows 11 version details
  4. Backward Compatibility: Preserves existing logic for older Windows versions

Example Behavior

Before:

  • Windows 11 22H2 → Reports as "Windows 10 Pro"
  • Windows Server 2022 → Reports as "Windows 10" (incorrect)

After:

  • Windows 11 22H2 → Reports as "Windows 11 22H2"
  • Windows Server 2022 → Reports as "Windows Server 2022" (correct)
  • Windows 10 systems → Continue to work exactly as before

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.

This comment was marked as off-topic.

Co-authored-by: Yuri05 <25061876+Yuri05@users.noreply.github.com>
Copilot AI changed the title [WIP] Installation Validator does not recognize Windows 11 Fix Windows 11 OS detection in validation reports Sep 1, 2025
Copilot AI requested a review from Yuri05 September 1, 2025 15:27
@Yuri05
Yuri05 marked this pull request as ready for review September 1, 2025 15:38
Copilot AI review requested due to automatic review settings September 1, 2025 15:38

This comment was marked as outdated.

@Yuri05

This comment was marked as outdated.

Co-authored-by: Yuri05 <25061876+Yuri05@users.noreply.github.com>

Copilot AI commented Sep 1, 2025

Copy link
Copy Markdown
Author

@copilot Copilot, the suggested code will not work properly with Windows Server editions. Modify it accordingly.

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

Copilot AI changed the title Fix Windows 11 OS detection in validation reports Fix Windows 11 OS detection and Windows Server compatibility in validation reports Sep 1, 2025
@Yuri05
Yuri05 requested a review from Copilot September 1, 2025 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/InstallationValidator.Core/Domain/OperatingSystemInfo.cs
Comment thread src/InstallationValidator.Core/Domain/OperatingSystemInfo.cs
@Yuri05 Yuri05 closed this Sep 3, 2025
@Yuri05
Yuri05 deleted the copilot/fix-254 branch September 3, 2025 20:29
@Yuri05

Yuri05 commented Sep 4, 2025

Copy link
Copy Markdown
Member

@copilot Copilot, unlink the issue #254 from this pull request.

@Yuri05 Yuri05 unassigned Yuri05 and Copilot Sep 4, 2025
@Yuri05
Yuri05 removed their request for review September 4, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation Validator does not recognize Windows 11

3 participants