If I modify or add an environment variable I have to restart the command prompt. Is there a command I could execute that would do this without restarting CMD?
Windows – command to refresh environment variables from the command prompt in Windows
cmdenvironment-variableswindows
Related Topic
- Windows – Setting Windows PowerShell environment variables
- Displaying Windows command prompt output and redirecting it to a file
- Windows – How to create an empty file at the command line in Windows
- Javascript – Read environment variables in Node.js
- Windows – List all environment variables from the command line
- Windows – Adding a directory to the PATH environment variable in Windows
- Bash – Set environment variables from file of key/value pairs
- Windows – Aliases in Windows command prompt
Best Answer
On Windows 7/8/10, you can install Chocolatey, which has a script for this built-in.
After installing Chocolatey, just type
refreshenv
.