-
Notifications
You must be signed in to change notification settings - Fork 905
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
RefreshEnv / Update-SessionEnvironment changes current user to SYSTEM #902
Comments
What version of Chocolatey here? |
Actually, I do think this is likely an issue. I know that it is one thing we've dealt with in the c# code that does the same, and we need to add those changes to both the powershell and batch versions |
Choco versjon is 0.9.10.3. |
I'd like to work on this one |
@rmlephiew go for it - read over the entire CONTRIBUTING doc first and ensure you can sign the CLA. We get somewhat picky about git commit message formatting, but that is covered in the doc. So as long as you follow the format you should be good to go. |
I'm having a similar issue with the Chocolatey installer. If I install chocolatey, the USERNAME environment variable gets changed to SYSTEM. Is this the same underlying cause? Or should I enter another issue? Steps to Reproduce:
|
Update: turns out, it isn't the Chocolatey installer. I'm running |
Recent conversation at https://gitter.im/chocolatey/choco?at=5893a086fba5bfea06c00636 |
Completed for 0.10.4. |
Previously, running RefreshEnv / Update-SessionEnvironment would change current user to SYSTEM. This is due to Machine environment variables noting user as SYSTEM. To stop this, set the original username as a variable and reset the Username environment variable after the refresh. Do the same for Processor_Architecture.
* stable: (GH-1098) Get-FtpFile - change int to long / improve error handling (docs) update generated docs (GH-1187) Get-ChocolateyUnzip - support both archs (GH-1039) Remove quotes before testing path (GH-686) Upgrade Scenarios for Prereleases (GH-686) Upgrade Prereleases (GH-1151) Option - Stop on first package failure (GH-902) Fix: User changed to SYSTEM during env update
What You Are Seeing?
If I run RefreshEnv.cmd in a ConEmu cmd-shell the current user is changed to SYSTEM in the environment variable USERNAME. This leads to the PATH to be broken.
What is Expected?
I'd expect the USERNAME to remain unchanged.
How Did You Get This To Happen? (Steps to Reproduce)
Ran RefreshEnv, both in regular cmd and in elevated cmd.
Output Log
My prompt shows the current user, so thats why I noticed.
gv@GVPC C:\Users\gv
SYSTEM@GVPC C:\Users\gv
The text was updated successfully, but these errors were encountered: