The Categorizer

the categorizer logo

Refresh Environment Variables in Windows 11 (Without Reboot)

It seems that you’re learning to program and trying to refresh environment variables in Windows 11 without rebooting your computer and restarting your project and disrupting the workflow.

The Windows OS provides a way for system administrators to change the values of environment variables in the registry. A special section of the registry called “Environment” contains all user-defined environment variables. You can modify these values through the use of the “Regedit” application.

An environment variable is a named object that contains data used by one or more applications. The environment variables are stored in the registry, where they can be viewed and edited using standard tools.

By the end of this article, you’ll be able to refresh environment variables in Windows without rebooting your computer:

Variables are used to store many sorts of data. System settings, inventory statuses, and other data can be stored in these variables. Environment Variables are a type of variable that contains environmental information about a computer. The environment variables in Windows can be used to make changes to the system without having to edit the registry.

The variables in the environment are used to define variables for a variety of purposes. Windows itself does not require them. You put up these variables, and they determine how Windows runs it. You can use them, for example, to identify your user or its location.

Environment Variables in Windows help you to assign values that will be used during the process of execution of any command on your computer. This will allow these commands to execute on a given set of values, altering their appearance.

Step 1: Open the Command Prompt from the Start menu, copy and paste the following command to install chocolatey package manager on your PC:

@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”

command to install chocolatey to refresh environment variables
Command to install Chocolatey using CMD

Step 2: After installing the Chocolatey Package Manager, type the command “refreshenv” (without quotation marks) to refresh system variables.

Command to Refresh environment variables using chocolatey
Refresh environment variables using chocolatey

NOTE: After the installation of the chocolatey package manager, every time you type and execute the “refreshenv” command, the environment variables will be refreshed immediately, without the need to restart the computer.

Step 1: In the Start menu, search for Command Prompt and run it as an administrator.

command prompt icon in windows 11
Command Prompt (CMD) Icon

Step 2: Type the command: “set PATH = c” (without quotation marks), press the enter key, and restart the Command Prompt.

"set PATH = c" command
“set PATH = c” command

Step 3: Type the command: “echo %PATH%” (without quotation marks) and press the enter key to reset system variables using CMD.

"echo%Path%" command to refresh environment variables
“echo %Path%” command

NOTE: After installing the PostgreSQL (PgAdmin 4), I tried this way to update environment variables, and it worked nicely.

What is the difference between System variables and Environment variables?

System environment variables are globally accessed by all users. The user Environment variables are specific only to the currently logged-in user and remain the default for the other users.

Where are the system variables stored in the registry?

The actual location of system variables in the registry is: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Session Manager > Environment.

Are environment variables stored in memory?

Environment variables and command line parameters are kept together at the top of the process memory structure, above the layer.

When you change the value of an environment variable in windows, the changes are not applied to your current windows session. You have to either log out and log in again or restart your device. But, in this article, we’ve covered how to reset environment variables in Windows 11 without rebooting the computer.

Variables can be accessed through DOS commands by typing “set”. They can also be accessed through other programs such as PowerShell and Command Prompt using the Control Panel applet or any other number of available applications for manipulating environment variables.

It’s important to know that the changes you make in the environment variables will be modified for other users of the system as well. They should not, however, be confused with Environment Variables in Windows.

Further, customize your computer’s configuration by referring to the related articles below.

how to check environment variables in windows

How To List All Environment Variables in Windows

Learn how to display all environment variables in Windows using any one of the 6 ways.

how to set path and system variables in windows

How To Add Path and System Variables in Windows

Learn how to properly set and configure the path and system variables in Windows.

Extended Dual Monitor Setup using one VGA Cable illustration

Dual Monitor Setup in Windows 11

Dual monitor setup for increased productivity and better task management.

how to run command prompt on startup in windows 11

Start Command Prompt Automatically

Are you a programmer who utilizes command prompt frequently? Why not start it at Windows boot automatically.

how to perform a clean boot in windows

How To Clean Boot Windows

Speed up Your Windows 11 using the Windows Clean Boot feature.

Take a Minute to Share This Article.