Windows uses something called Environment Variables for various folders, drives, and paths. You can think of the Environment Variable like easy to remember shortcut words or placeholders. For instance, if you want to open your home folder, you can simply use the environment variable
%HOMEPATH% rather than the full path
C:\Users\UserName\. As you can see, the environment variables are not only easy to remember but also make it easy to go the folder or path quickly.
Windows 10 has several such environment variables that make your life easier. Below is the list of all useful environments variable in Windows 10.
Note: some folders or paths have multiple environment variables and often can be used interchangeably. Also, this post assumes that the C drive (C:\) is your operating system drive.
Windows Environment Variables List
|Environment Variable||Corresponding Path|
|%SystemDrive%||C:\ (Operating System drive)|
|%HOMEDRIVE%||C:\ (Operating System drive)|
|%PROGRAMFILES(X86)%||C:\Program Files (x86)|
|%COMMONPROGRAMFILES%||C:\Program Files\Common Files|
|%COMMONPROGRAMFILES(x86)%||C:\Program Files (x86)\Common Files|
How to Use Environment Variables
Now that you know a bunch of Windows 10 environment variables, you might be wondering how to use these environment variables. Actually, there are quite a few ways you can use these environment variables. I’ll show two of the most common ways to use the environment variables to open the relevant folders.
In File Explorer
Using the environment variable in File Explorer is not hard. First, open the File Explorer by clicking on the taskbar icon or by pressing the keyboard shortcut Win + E. In the File Explorer, type the environment variable in the address bar and press Enter. As you can see, I’ve used
%USERPROFILE% to open my home folder.
In Run Dialog Box
Environment variables are most commonly used in the Run dialog box. Open the Run dialog box by pressing the keyboard shortcut Win + R, type the environment variable, and press Enter. That is it. As soon as you press the button, the folder will open.
Apart from the above two methods, environment variables are also generally used in the batch and PowerShell scripts.