DEV Community

Abdenour ALIANE
Abdenour ALIANE

Posted on

1 1

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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay