DEV Community

Abdenour ALIANE
Abdenour ALIANE

Posted on

Update env variables in Windows 10 without Restarting/Logout

Hi,
a quick post, I just installed WAMP and I needed to work with MySQL from the shell (Powershell or cmd or whatever :P ), I added the bin folder to the Environment Variables but without restarting, here is how to do it quickly :

1 - Install Chocolatey as an Admin using this command from PowerShell :
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

2 - Run this simple command : RefreshEnv.cmd (you can use Refre and type Tab like you do in Linux...right ? ^^ )

3 - Done

Top comments (0)