If you are not a Windows power user, chances are that you have not heard about Windows environment variables, a set of dynamic variables that can be changed at any time.
The main purpose of environment variables is to cope with the changes in each new version of the Operating System. There are two types of environment variables in Windows.
System variables are used for global variables meaning that changing the system variables will affect all the users of the computer. User variables only affect only the user who is currently logged in.
Why are environment variables important?
Let’s take a simple example to understand why environment variables are important. If you have used previous versions of Windows like Windows XP, Windows Vista and Windows 7, you should know that Microsoft keeps on changing names and paths of important folders (which are important for running some third party software which make use of these folders).
For example, in Windows XP and earlier, the user profiles were kept in C:Documents and Settings but from Windows Vista onwards, the user profiles reside in C:Users folder.
Similarly, talking about third party software, the programs written in Java programming language need the path of the Java Runtime Environment (JRE) in order to run. The path of the latest JRE is stored in an environment variable which can be changed when a new version of Java is installed.
The default folder where Windows is installed is C:Windows but you can change this folder path to another folder in the Windows environment variables to make sure you boot from the correct installation.
Managing and editing environment variables manually
There are times when the user needs to edit the environment variables. Windows provides an option to edit all the environment variables in one place including system variables and user variables.
If you are using Windows 8, follow the instructions below to open the environment variable editor: In Windows Search, select Settings (Windows Key + W) and search for “Environment variables".
You will see two results:
Edit environment variables for your account
Edit the system environment variables
Both of the options are self-explanatory. You can select either to edit the appropriate environment variables. Upon selection, a new window will open with the list of user variables at the top and system variables at the bottom. Here you can add a new variable with its name and value or edit an existing variable.
Let’s take an example scenario to understand the concept of environment variables further. I have some programs that I want to run from the Run menu directly without giving their paths first. This will be a lot easier for me. I also should be able to call the programs or files by their “nicknames".
Create a folder “E:tech" and open the environment variables editor as discussed above. Under the system environment variables, edit the Path variable. In order to add the folder path, append the folder path at the end of the value. The value that should be appended is ;Etech. The semicolon is important to differentiate between multiple paths.
Now you will be able to put any executable, shortcut or any other file in the specified folder and then run the executable directly by its name without entering the path first. For example, I have put tech.exe in the folder which I will be able to run by going to Run –> tech.
Managing environment variables using third party software
If anything goes wrong with any important environment variable (like the Path variable which we discussed), some Windows tasks will be affected and you will not be able to use the Operating System normally. Therefore it is always advisable to edit or remove the environment variables with great care. We will discuss some third party software to manage and back up environment variables.
Rapid Environment Editor
Rapid Environment Editor (REE) provides a very user-friendly way of editing environment variables. It lists the system variables in the left pane and the user variables in the right pane, while the bottom pane will give details about the selected variable.
The best thing about REE is that it will also highlight a variable if its value has some errors. You can also back up the environment variable configuration from the file menu. Rapid Environment Editor comes with an installable program as well as a portable one. If you are using the portable REE in Windows 7 or Windows 8, you will need to run the executable in administrative mode so that it can make changes to the system configuration.Rapid Environment Editor
PathMan is a very simple portable program which will only edit the PATH environment variable. Since PATH is the variable which needs to be edited frequently, PathMan can come in handy for editing Path environment variable directly from the USB drive.
Eveditor comes with an elegant and very user-friendly graphical user interface which resembles the look and feel of Windows Explorer. You can choose from user variable or system variable from the pane on the left. The selection will be displayed on the right hand pane. The details of the selected environment variable will be displayed in the bottom pane.
You can edit the selected variable, and upon clicking the “Set" button, the variable will be saved. Please note that you will need to run Eveditor with administrative privileges in order to save the environment variables successfully.Eveditor
At the end, it is always recommended to back up before you make changes to your system. You can either back up the Windows environment variables configuration using Rapid Environment Editor or the complete Windows configuration using Windows 8 File History Tool.
If you ever want to edit the environment variables, the use of third party software will make it easier for you to manage and revert the values. For what purposes you edit environment variables? Tell us some interesting uses.