I have found out that setting the PATH environment variable affects only the old command prompt. PowerShell seems to have different environment settings. How do I change the
From the PowerShell prompt:
setx PATH "$env:path;\the\directory\to\add" -m
You should then see the text:
SUCCESS: Specified value was saved.
Restart your session, and the variable will be available. setx
can also be used to set arbitrary variables. Type setx /?
at the prompt for documentation.
Before messing with your path in this way, make sure that you save a copy of your existing path by doing $env:path >> a.out
in a PowerShell prompt.