Skip to content

Commit

Permalink
(GH-1178) Fix: OS_NAME not reported as Windows 10
Browse files Browse the repository at this point in the history
According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832.aspx,
Windows 10 and Windows Server 2016 are created as 10.0 and not 6.4.
However it is thought that 6.4 was an original value for some early
Windows 10 builds, so keep it set. Add a fix for 10.0 to show Windows
10 / Windows Server 2016 appropriately.
  • Loading branch information
ferventcoder committed Mar 2, 2017
1 parent dd8b731 commit 532da28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/chocolatey/infrastructure/platforms/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ private static string get_windows_name(Version version)
string majorMinor = version.Major + "." + version.Minor;
switch (majorMinor)
{
case "10.0":
name = isServer ? "Windows Server 2016" : "Windows 10";
break;
case "6.4":
name = isServer ? "Windows Server 2016 (?)" : "Windows 10";
name = isServer ? "Windows Server 2016" : "Windows 10";
break;
case "6.3":
name = isServer ? "Windows Server 2012 R2" : "Windows 8.1";
Expand Down

0 comments on commit 532da28

Please sign in to comment.