Replies: 1 comment
-
|
Hi soredake, I understand the convenience such a feature would offer, especially in scenarios like the one you've described with Node.js installation. However, an .EXE app can't update the invoker (i.e. non-elevated) shell's environment variables. It could be done by a .cmd batch file such as chocolatey's built-in refreshenv.cmd. Adding this to this project extends beyond the scope of what That said, I can recommend an alternative approach. You might want to look into RefrEnv, a tool specifically designed for refreshing environment variables in Windows. It can help update your non-elevated shell's environment variables more easily, which seems to align with your requirements. Again, I appreciate your input and hope this alternative can be of help! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, I want to install Node.js using sudo winget install -h nodejs, i have WingetPathUpdater installed, the problem is, it will update env only in elevated scope, so if I want to execute node or npm from non-elevated scope I need to will need to manually refresh env. Is it possible to have an option like
--update-envthat will pull updated environmental variables after the elevated command finishes and apply this env to the non-elevated shell?jazzdelightsme/WingetPathUpdater#4
Beta Was this translation helpful? Give feedback.
All reactions