Skip to content

Commit

Permalink
Improved detection of Windows 10S
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelTroka committed Nov 20, 2017
1 parent 4acef59 commit b2974f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Computator.NET.DataTypes/Configuration/RuntimeInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace Computator.NET.DataTypes.Configuration
{
public static class RuntimeInformation
{
private const uint PRODUCT_CLOUD = 0x000000B2; // Windows 10 S
private const uint PRODUCT_CLOUD = 0x000000B2; // Windows 10S
private const uint PRODUCT_CLOUDN = 0x000000B3; // Windows 10S N edition

[DllImport("Kernel32.dll")]
public static extern bool GetProductInfo([In] uint dwOSMajorVersion, [In] uint dwOSMinorVersion,
Expand All @@ -24,7 +25,7 @@ public static bool IsWindows10S
GetProductInfo((uint) Environment.OSVersion.Version.Major, (uint) Environment.OSVersion.Version.Minor,
(uint) Environment.OSVersion.Version.MajorRevision,
(uint) Environment.OSVersion.Version.MinorRevision, out var productType);
return productType == PRODUCT_CLOUD;
return productType == PRODUCT_CLOUD || productType == PRODUCT_CLOUDN;
}
}

Expand Down

0 comments on commit b2974f7

Please sign in to comment.