Skip to content

Incorrect Windows Version Detection on Windows 11 #6232

@Rovo1211

Description

@Rovo1211

Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:

Rubberduck version 2.59.6321
Operating System: [Windows 11 Home 23H2]
Host Product: [MS Excel]
Host Version: [office365]
Host Executable: [excel.exe]

Description
I’m running Rubberduck version 2.5.9.6321 on Windows 11 Home, version 23H2 (build 22631.4602). However, the Rubberduck log file still identifies the operating system as Windows 10 Home 2009 x64.
Here is the relevant log entry:
[Log entry]
2024-12-14 12:56:23.6823;TRACE-2.5.9.6321;Rubberduck.Common.LogLevelHelper;
Rubberduck version 2.5.9.6321 loading:
Operating System: Windows 10 Home 2009 x64 (Microsoft Windows NT)
[/log entry]
To Reproduce
Steps to reproduce the behavior:

  1. Run Rubberduck on Windows 11 (version 23H2).
  2. Check the Rubberduck log file.

Expected behavior
The log should correctly identify the operating system as Windows 11 Home.
Actual Behavior
The log incorrectly identifies the operating system as Windows 10 Home

Screenshots
If applicable, add screenshots to help explain your problem.
RubberduckLog.txt

Logfile
Rubberduck generates extensive logging in TRACE-Level. If no log was created at %APPDATA%\Rubberduck\Logs, check your settings. Include this log for bug reports about the behavior of Rubberduck.

Additional context
This seems to occur because Windows 11 still shares certain internal version data with Windows 10 for backward compatibility. Rubberduck may be using outdated or legacy APIs (such as GetVersionEx) to retrieve the OS version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies work items for known bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions