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

Update OS_NAME environment variable to support Windows 11 and Server 2019/2022 #2754

Closed
TheCakeIsNaOH opened this issue Jun 30, 2022 · 1 comment · Fixed by #2755
Closed
Assignees
Milestone

Comments

@TheCakeIsNaOH
Copy link
Member

Is Your Feature Request Related To A Problem? Please describe.

The OS_NAME environment variable is set to Windows 10 when running on Windows 11. This should be corrected.

Describe The Solution. Why is it needed?

The operating system name should be correct

Additional Context.

The OS name is generated based on the build number here:

case "10.0":
name = isServer ? "Windows Server 2016" : "Windows 10";
break;
case "6.4":
name = isServer ? "Windows Server 2016" : "Windows 10";
break;
case "6.3":
name = isServer ? "Windows Server 2012 R2" : "Windows 8.1";
break;
case "6.2":
name = isServer ? "Windows Server 2012" : "Windows 8";
break;
case "6.1":
name = isServer ? "Windows Server 2008 R2" : "Windows 7";
break;
case "6.0":
name = isServer ? "Windows Server 2008" : "Windows Vista";
break;
case "5.2":
name = isServer ? "Windows Server 2003" : "Windows XP";
break;
case "5.1":
name = "Windows XP";
break;
case "5.0":
name = "Windows 2000";
break;

Related Issues

N/A

TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 30, 2022
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
@TheCakeIsNaOH TheCakeIsNaOH self-assigned this Jul 30, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Sep 25, 2022
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Sep 25, 2022
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 22, 2022
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 7, 2023
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 6, 2023
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jun 15, 2023
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jul 1, 2023
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
@gep13 gep13 added this to the 2.3.0 milestone Dec 14, 2023
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 9, 2024
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Apr 24, 2024
This allows Chocolatey CLI to detect Windows 11, Server 2019 and Server 2022.
Which will allow the OS_NAME environment variable to be set correctly on those
operating systems.
gep13 added a commit that referenced this issue Apr 24, 2024
(#2754) Add support for detecting newer Windows versions
@pauby pauby changed the title Update OS_NAME to support Windows 11 and Server 2019/2022 Update OS_NAME environment variable to support Windows 11 and Server 2019/2022 May 28, 2024
@choco-bot
Copy link

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your GitReleaseManager bot 📦 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants