Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$env:OS_NAME is 'Windows' for Windows 10 #1178

Closed
pauby opened this issue Mar 2, 2017 · 4 comments
Closed

$env:OS_NAME is 'Windows' for Windows 10 #1178

pauby opened this issue Mar 2, 2017 · 4 comments

Comments

@pauby
Copy link
Member

pauby commented Mar 2, 2017

What You Are Seeing?

The environment variable OS_NAME is 'Windows' for Windows 10

What is Expected?

$env:OS_NAME should be 'Windows 10' for Windows 10. Under Windows 7 it reports, correctly, Windows 7.

How Did You Get This To Happen? (Steps to Reproduce)

Inside ChocolateyInstall.ps1 on a package I am testing I added this code:

Write-Debug "OS: $($env:OS_NAME)"

Output Log

https://gist.github.com/pauby/8fbf295ecd86d47b24cd554a6d5c08c0

@gep13
Copy link
Member

gep13 commented Mar 2, 2017

Looks like this:

private static string get_windows_name(Version version)

Will need extended to include Windows 10.

@ferventcoder
Copy link
Member

name = isServer ? "Windows Server 2016 (?)" : "Windows 10";
(has it) - wonder how the version is coming through.

@ferventcoder
Copy link
Member

@gep13
Copy link
Member

gep13 commented Mar 2, 2017

@ferventcoder said...
Oh..

Nothing like a bit of consistency 😄

ferventcoder added a commit that referenced this issue Mar 3, 2017
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.
ferventcoder added a commit to ferventcoder/choco that referenced this issue Mar 9, 2017
* stable:
  (chocolateyGH-1193) Allow version check with FIPS
  (chocolateyGH-1155) do not warn nupkg on pack/push
  (chocolateyGH-1187) File64 - Install-ChocolateyInstallPackage
  (maint) Add 64-bit process Information variable
  (chocolateyGH-1155) Warn when .nupkg/.nuspec used in args
  (chocolateyGH-262) BypassProxy on IHttpClient
  (chocolateyGH-1134) use console adapter for width
  (chocolateyGH-1182) trace network traffic
  (chocolateyGH-1181) Configure a source for self-service
  (chocolateyGH-1180) Create .ignore file only in choco path
  (chocolateyGH-1177) Fix: MSU fails when spaces in path
  (maint) formatting
  (chocolateyGH-1178) Fix: OS_NAME not reported as Windows 10
  (chocolateyGH-1134) ensure GetPackageManager w/older licensed
  (chocolateyGH-1165) pass proxy bypass list to debug message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants