You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to install Chocolatey from the install script located here - https://chocolatey.org/install.ps1, and when run it looks like it is erroring out when trying to read and expand properties from the registry key 'HKCU:\Environment'.
This is possibly because I am doing this on a Windows Server 2012 R2 Core install and it does not have the registry key 'HKCU:\Environment'.
Seen this on Server 2012 R2 Standard also. Can reproduce if any further information would help. (edit: google group link above works now I've signed up to the group, thanks Rob)
@Ian2020 the link works after you've signed up for the group. We've had issues with Google not properly masking email addresses in the threads so we require you to join to cut down on spammers.
When attempting to expand or work with `HKCU:\Environment`, that can
error due to not having an existing `Environment` key in HKCU. This can
occur in certain Windows Server versions, such as Server Core which
doesn't have the key. This can also happen in other situations as well.
- In `Get-EnvironmentVariableNames`, when expanding from
`HKCU:\Environment` and it fails, silently continue.
- When attempting to remove variables at User scope for
Get-ToolsLocation, fail those silently.
- If you can't set the Get-ToolsLocation value for User scope, attempt
Machine scope instead.
- With `Install-ChocolateyEnvironmentVariable`, if the attempt to set
to User scope fails and the user is an administrator, attempt to set
it with Machine scope. Otherwise fail.
- In `Get-EnvironmentVariable`, if the registry key is null, do not
attempt to grab a value or close it.
Trying to install Chocolatey from the install script located here - https://chocolatey.org/install.ps1, and when run it looks like it is erroring out when trying to read and expand properties from the registry key 'HKCU:\Environment'.
This is possibly because I am doing this on a Windows Server 2012 R2 Core install and it does not have the registry key 'HKCU:\Environment'.
https://groups.google.com/d/msgid/chocolatey/e779ca75-3a14-4d61-a575-339802c59d1b%40googlegroups.com
The text was updated successfully, but these errors were encountered: