Skip to content

Commit

Permalink
Issue crc-org#2666 Fix win edition check in the preflight and msi
Browse files Browse the repository at this point in the history
The name of the edition for windows 10 Home edition is "Core"
and not "Home"

```
PS > (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID
Core
```
  • Loading branch information
anjannath committed Aug 30, 2021
1 parent 3e596b9 commit e4f1d80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packaging/windows/product.wxs.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<RegistrySearch Id="WindowsEditionReg" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="EditionID" Type="raw" />
</Property>
<Condition Message="CodeReady Containers cannot run on Windows Home edition">
<![CDATA[Installed OR (WINDOWSEDITION <> "Home")]]>
<![CDATA[Installed OR (WINDOWSEDITION <> "Core")]]>
</Condition>

<util:Group Id="CrcUsersGroup" Name="crc-users" />
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/preflight/preflight_checks_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func checkWindowsEdition() error {
windowsEdition := strings.TrimSpace(stdOut)
logging.Debugf("Running on Windows %s edition", windowsEdition)

if strings.HasPrefix(windowsEdition, "Home") {
if strings.ToLower(windowsEdition) == "core" {
return fmt.Errorf("Windows Home edition is not supported")
}

Expand Down

0 comments on commit e4f1d80

Please sign in to comment.