Quick Access

How to create custom environment variables on Windows 10

Custom variables are handy shortcuts for quicker access to folders locations on your Windows 10 PC — Here's how you can create them.

Windows 10 custom environment variables

On Windows 10, environment variables are globally known names that refer to certain path locations within the operating system, such as to a particular folder or drive on your computer.

For example, instead of having to browse to C:\Users\accountName to access your account folders, you can simply type %HOMEPATH% in the Run command and hit enter to access the same location.

There are a number of built-in environment variables on Windows 10 that can come in handy on a number scenarios, especially when creating a script. However, you’re not limited to the default list, you can create your very own variables if you want to have quicker access to certain locations.

In this guide, you’ll learn the steps to create custom environment variables on Windows 10

How to create custom environment variables

  1. Open Start.

  2. Search for Edit the system environment variables and click the result.

  3. On the Advanced tab, click the Environment Variables button.

    System Properties
    System Properties
  4. Under User variables, click New.

    Custom Environment Variables
    Custom Environment Variables
  5. On the Variable name field, enter the name you want for the variable (e.g. PIX).

  6. On the Variable values field, enter the path for the folder, drive, or file you want to open with the new variable (e.g. C:\Users\Admin\Pictures).

  7. Click OK.

    New user variable
    New user variable
  8. Repeat the steps 4, 5, 6, 7 to add more custom variables.

  9. Click OK to complete the task.

Once you complete the steps, you can test new environment variable by opening the Run command (Windows key + R), typing the name of variable (e.g. %PIX%), and clicking OK.

If you want to delete a variable, you can follow the same steps, but on step 4, select the variable, and click the Delete button.

Was this helpful? Support the long hours of work.