WindowsEditionHelper

Detects the currently running Windows edition and flips between Home/Pro/Enterprise. Upgrades (Home → Pro, Pro → Enterprise) go through the supported changepk.exe path. Downgrade Pro → Home is UNSUPPORTED by Microsoft and done via registry rewrite plus slmgr /ipk of a Home generic key. User data stays in place. A future Windows feature update may revert the edition marker back to Pro.

[SupportedOSPlatform("windows")]
public static class WindowsEditionHelper

1. Attributes

1.1. SupportedOSPlatformAttribute

public sealed class SupportedOSPlatformAttribute : OSPlatformAttribute

2. Methods

2.1. ChangeEdition(ISystemHost, WindowsEdition, string)

public static void ChangeEdition(ISystemHost host, WindowsEdition target, string productKey)
Table 1. Parameters
Name Type Description

host

ISystemHost

target

WindowsEdition

productKey

string

2.2. GetCurrentEdition(ILogger)

public static WindowsEdition GetCurrentEdition(ILogger logger)
Table 2. Parameters
Name Type Description

logger

ILogger

Returns: WindowsEdition