Skip to content

Install-Defaults.ps1 incorrectly skips Machine-W1123H2.All.json #72

@PZan

Description

@PZan

Describe the bug
After reading through the log file I was surprised to see the following entry running on a device running Windows 11 23H2 (10.0.22631.0):
Skipped maximum version: C:\WINDOWS\IMECache\[...]\configs\Machine-W1123H2.All.json

So I decided to dig deeper and I believe that I've found a bug related to how the json minimum and maximum version strings are handled and compared to [System.Environment]::OSVersion.Version.

The System.Environment class OS Version variable looks like follows:

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      22631  0

Whereas the json variables are imported as

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      22000  -1

and

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      22631  -1

Adding a revision to the minimum and maximum strings so that they look like 10.0.22000.0 and 10.0.22631.0 to the Machine-W1123H2.All.json appears to circumvent the "bug". I'm not sure if this is the preferred method to work around the issue or if there should be fixing in the Install-Defaults.ps1 file. Nonetheless I wanted to make you aware of this issue.

Environment (please complete the following information):

  • OS: Windows 11 23H2
  • Version: 10.0.22631.0
  • Physical hardware type

Additional context
I want to apologize for not having followed up the other issue I submitted a while ago. Other tasks has come in the way, but I'm now in the midst of testing this out at this moment. Which is why I'm inspecting the files more thoroughly and led me to this discovery.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions