My PATH has few entries like %SystemRoot%
, %USERPROFILE%/
... etc which are pointing to another env variable. But when I update the PATH with command line, it replaces those env entries with actual value like e.g. below
Earlier Entry : %SystemRoot%;%USERPROFILE%\AppData
SETX MY_ENV "C:\MyData"
SETX PATH %MY_ENV%;%PATH%
Path Value : C:\MyData;C:\Windows;C:\USers\UserName\AppData
But, I am looking for a solution which can be run directly as cmd line por through Batch programming that will set my Path as below
%MY_ENV%;%%SystemRoot%;%USERPROFILE%\AppData
This is not the Path variable meant for logged in user but is the system path variable.