Skip to content

Fixes #254 Installation Validator does not recognize Windows 11 - #298

Merged
msevestre merged 1 commit into
Open-Systems-Pharmacology:developfrom
Yuri05:254_Win11
Sep 5, 2025
Merged

Fixes #254 Installation Validator does not recognize Windows 11#298
msevestre merged 1 commit into
Open-Systems-Pharmacology:developfrom
Yuri05:254_Win11

Conversation

@Yuri05

@Yuri05 Yuri05 commented Sep 3, 2025

Copy link
Copy Markdown
Member

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).

grafik

Copilot AI review requested due to automatic review settings September 3, 2025 11:08

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 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.

Comment thread src/InstallationValidator.Core/Domain/OperatingSystemInfo.cs
{
var productName = registryHKLMValue(WINDOWS_REG_KEY, "ProductName");
var version = registryHKLMValue(WINDOWS_REG_KEY, "CSDVersion");
var version = registryHKLMValue(WINDOWS_REG_KEY, "DisplayVersion");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The registry key CSDVersion is outdated. For the newer OS (Win 11, Win Server 2022/2025) it is DisplayVersion

@Yuri05 Yuri05 linked an issue Sep 3, 2025 that may be closed by this pull request
@msevestre
msevestre merged commit 16ab347 into Open-Systems-Pharmacology:develop Sep 5, 2025
1 check passed
@Yuri05
Yuri05 deleted the 254_Win11 branch November 9, 2025 14:23
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

4 participants