1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Environment Variable

By

Definition: An environment variable is a dynamic value that the operating system and other software can use to determine information specific to your computer.

Some of the most common environment variables in Windows systems include %path%, %programfiles%, %systemroot%, and %temp%, though there are many others.

For example, when Windows XP is first installed, the %systemroom% environment variable is set to the directory in which it's installed to. Since the installation directory is something the installer can define, in one computer it might be C:\Windows but in another it may be C:\WinXP.

Continuing with this example, suppose a word processing program is installed on both computers. A number of files need to be installed into the directory that Windows XP is installed in. However, if this can be different from computer to computer, how can the word processing program be sure it's installing the files in the right place?

To prevent a potential problem like this, the word processing program was designed to install to %systemroot%, not C:\Windows. This way, it can be sure that these important files are installed in the same directory as Windows XP, no matter where that might be.

Examples:
"As my hard drive filled up, I changed the %temp% environment variable to a folder on another drive. That forced all of the temporary and other junk files to accumulate on my much bigger second hard drive."

©2014 About.com. All rights reserved.