Re:Environment Variables and Path in Windows 10
by ygra on Monday October 26, 2015 @08:35AM
(#10450943)
PS> $Env:Path - split ';'
The operator is -split, without the space. In any case, it won't work, because the path can contain quoted items that contain a semicolon.
Re:Environment Variables and Path in Windows 10
by majkinetor on Monday October 26, 2015 @03:55PM
(#10453983)
Wow, in what universe that happens ? :)
I mean, yeah, sure, it can happen once in a lifetime... Even so, its easy to fix.
This drives me nuts on Linux: env. vars aren't systemically available as on Windows where you even have an option to broadcast change so that even running applications can update. I wonder why there isn't POSIX standard for this, perhaps /etc/environment would be good choice if standardized.
On Windows, you don't really need any than that. To get PATH env var the way it is now in Win 10 just do in any windows
Setting the var in the system is equally fast and you can make stuff even better - for instance my POSH function keeps backup of old env var value, i.e. if i change the PATH today I would also have PATH_2015_10_26 with old value.So please Windows admins, stop being fucking clickzor n00bs and start using Powershell. Its embarrassing.
As a related note, the most awesome of all editors on Windows is Total Commander "Environment Variables" plugin - you can do all kinds of stuff there (regex search/replace, backup/restore as simple file copy, fuzzy search, bookmarks ..)