Environment Variables for Windows

The Environment Variables feature in Microsoft PowerToys offers a convenient way to manage environment variables on Windows, enabling users to add, edit, and apply profiles for both user and system settings. This tool is particularly useful for configuring system behaviors, paths to application directories, temporary folders, or any other system configurations that rely on environment variables.

PowerToys’ Environment Variables tool allows for the creation of profiles, which are essentially sets of environment variables that can be managed together. This is especially helpful for users who need to switch between different configurations frequently. Profile variables take precedence over User and System variables, providing a flexible way to manage environment settings. When a profile is applied, it automatically updates the User environment variables in the background. If there’s an existing variable with the same name, the tool creates a backup of the User variable, which can be restored when the profile is no longer applied. The tool also provides an “Evaluated Path” feature, showing the current state of the environment with respect to the order of evaluation of environment variables.

Create Environment Variables on Windows 11 from PowerToys

To use PowerToys for managing environment variables, you first need to install the PowerToys application. Once installed and launched, you can navigate to the Environment Variables section to start managing your variables. The tool provides options to add new user or system variables, edit or delete existing ones, and create profiles for managing a set of variables together. It’s recommended to run PowerToys with administrator privileges to manage system variables effectively. The interface is user-friendly and modern, making it easier to manage these settings compared to traditional methods. We have listed all these steps in details.

  1. Open PowerToys.
  2. Click on Environment Variables.
  3. Turn on the “Enable Environment Variables” toggle switch (if applicable).
  4. Under the “Activation” section, click the “Launch Environment Variables” option.
  5. Under the “Default variables” section, click the “User” setting to view the current variables.
    Quick note: If you want to create a variable that will apply to all users, choose the “System” option instead.
  6. Click the Add variable button.
  7. Confirm the name for the new environment variable. For example, “Screenshots.”
  8. Confirm the path for the folder, drive, or file to open with the new variable. For example, “C:\Users\account\OneDrive\Pictures\Screenshots.”
  9. Click the Save button.

After you complete the steps, the tool will create and apply the link to the location or file to the specific name you specified.

Set up a variable profile

A profile is a feature only available in PowerToys that allows you to enable or disable custom environment variables quickly. When using this option, the configuration will apply to the current user, not globally.

To create a profile with variables, use these steps:

  1. Open PowerToys.
  2. Click on Environment Variables.
  3. Turn on the “Enable Environment Variables” toggle switch (if applicable).
  4. Under the “Activation” section, click the “Launch Environment Variables” option.
  5. Click the New profile button.
  6. Confirm the name of the profile.
  7. Turn on the “Enabled” toggle switch.
  8. Click the Add variable button.
  9. Click the New tab.Quick note: You can also add existing configurations from the “Existing” tab.
  10. Confirm the name for the new environment variable. For example, “Screenshots.”
  11. Confirm the path for the folder, drive, or file to open with the new variable. For example, “C:\Users\account\OneDrive\Pictures\Screenshots.”
  12. Click the Add button.
  13. Click the Save button.

Once you complete the steps, the environment variables will apply to the user, and you can use the toggle switch next to the profile to turn on or off the configurations as needed.

You can also add variables to the “system” level. The difference between the “user” and “system” is that the variables for “user” only apply to the current user account that’s logged in, while the “system” configuration applies globally to all users.

Leave a Comment