Fixes #254 Installation Validator does not recognize Windows 11 - #298
Merged
Merged
Conversation
…ecognize Windows 11
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the Installation Validator's inability to recognize Windows 11 by implementing logic to correctly identify Windows 11 systems based on build number rather than relying solely on the registry product name.
- Adds a private method to detect Windows 11 by checking if build number >= 22000
- Updates the FriendlyName property to use DisplayVersion instead of CSDVersion and apply Windows 11 detection
- Includes comprehensive unit tests for the Windows 11 detection logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/InstallationValidator.Core/Domain/OperatingSystemInfo.cs | Implements Windows 11 detection logic and updates registry key usage |
| tests/InstallationValidator.Tests/Domain/OperatingSystemInfoSpecs.cs | Adds unit tests for Windows 11 detection functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Yuri05
commented
Sep 3, 2025
| { | ||
| var productName = registryHKLMValue(WINDOWS_REG_KEY, "ProductName"); | ||
| var version = registryHKLMValue(WINDOWS_REG_KEY, "CSDVersion"); | ||
| var version = registryHKLMValue(WINDOWS_REG_KEY, "DisplayVersion"); |
Member
Author
There was a problem hiding this comment.
The registry key CSDVersion is outdated. For the newer OS (Win 11, Win Server 2022/2025) it is DisplayVersion
rwmcintosh
approved these changes
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Windows 11, the product name in the registry is still Windows 10 (for whatever reason).
The correct product name (Win 10 or Win 11) can be determined from the combination of the product name and the build number (which is >=22000 for Win 11).