Is there a command to refresh environment variables from the command prompt in Windows?

On Windows 7/8/10, you can install Chocolatey, which has a script for this built-in.

After installing Chocolatey, just type refreshenv.

Leave a Comment