Is it possible to reuse environment variables in the Path environment variable from PowerShell?
There are some environment variables like %SystemRoot%
defined and are used in Path variable ...;%SystemRoot%\system32;...
viewed in the Advanced System Settings.
In PowerShell these are defined as $Env:SystemRoot
and $Env:Path
part of that path is resolved with ...;c:\windows\system32;...
How to create and use such a custom variable in the Path? e.g. $Env:MyPath = 'c:\mypath'
adding it to Path like ...;%MyPath%\documents;...
and get the same effect in both Advanced System Settings and PowerShell $Env:Path
resolution?
No comments:
Post a Comment