Environment variables windows
Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.
You can say, It is a dynamic “object” that stores a value, which in turn can be referenced by one or more software programs in Windows (OS). Environment variables help programs know what directory to install files in, where to store temporary files, where to find user profile settings, and many other things.
Variable names are NOT case sensitive in Windows OS.
Environment variables are dynamic because they can change. The values stored can be changed to match the current system’s setup and design (environment). They can also differ between computer systems because each computer can have a different setup.
There are a number of environment variables that get referenced by programs and can come in handy for a computer user to find needed information about their computer environment.
Below is the list of some common and important environment variables.
%appdata%
%commonprogramfiles%
%local%
%localappdata%
%programfiles%
%temp%
%userprofile%
%windir%
You can get some common information using environment variable quickly.
You can quickly access any of the above folders by entering the environment variable in the Windows Run box or Windows Search Box.
e.g: To get into the Application Data folder type %appdata% and then press Enter in the Run box.
%appdata%
The %appdata% environment variable contains the directory path to the Application Data folder for your user profile. This folder stores settings and logs, among other things, for various software programs. The settings and logs stored there are specific to your user profile.
%commonprogramfiles%
The %commonprogramfiles% environment variable contains the directory path to the Common Files folder, within the main Program Files folder. This folder contains various files for common programs and utilities on a computer, mostly system and services related. The default directory path this variable points to is c:\Program Files\Common Files.
%local%
The %local% environment variable points to where the security policies & rules are located for the user’s account, Windows in general, Windows Firewall, Network, and various software programs on the computer. This environment variable is native to Windows 7.
%localappdata%
The %localappdata% environment variable contains the directory path to where programs store their temporary files. Common temporary files to be stored here are Desktop Themes, Windows Error Reporting, program caching and Internet browser profiles. This environment variable is native to Windows Vista & Windows 7.
%programfiles%
The %programfiles% environment variable contains the directory path to where programs are installed. This directory contains sub-directories for each program, which contain the primary files needed by each program in order to run on a computer. The default directory path this variable points to is c:\Program Files.
%temp%
The %temp% environment variable contains the directory path to where temporary files stored. These temp files are often Internet temporary files and other user application temporary files (Microsoft Word, Excel, Outlook, etc.).
%userprofile%
The %userprofile% environment variable points to the current logged in user’s profile and the directory where user profile data is stored. It is in this directory that a user can find the following folders: My Documents, My Music, My Pictures, Desktop, and Favorites (Internet Explorer bookmarks).
%windir%
The %windir% environment variable points to the Windows directory, where Windows system files are located.The default directory path for most versions of Windows is c:\Windows (for Windows NT 4 and 2000, it is c:\WinNT).