Windows 7 Environment Variables in Windows 7

The following are Environment Variables in Windows 7 which can allow you to get to system locations more efficiently.

What are Environment Variables in Windows?

Well, if we understand that "variables" are things that can be changed, and if we also understand that the environment that variables are in, in this case, consists of Microsoft Windows, then we can understand that Environment Variables allow you to access common system locations and even functions even if they have been programmed to be located in different areas or on different drives. For example, your user profile may not be on Drive C, so to get to it, you could use the environmental variable %HOMEPATH% to get to your User Profile data.

Environmental Variables are also very useful in basic scripting and other uses. You may find a need to use them at some time or other.

You can add your own Environment Variables in Windows 7 by going to:

  • Start -> Search -> Environment

From here you can select two options:

  • Edit environment variables for your account
  • Edit the system environment variables

Changes to account variables are not universal for the system, while changing or adding system environment variables are.

Easy to Use/Program Environment Variables


C:\Program Files\Common Files

Only available in 64-bit (x64) OS, and point to Common Files directory in 32-bit Program Files.






Varies. Includes C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem

.COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC


Directory containing program files, usually C:\Program Files

In 64-bit systems, directory containing 32-bit programs. Usually C:\Program Files (x86)
%PROMPT% Code for current command prompt format. Code is usually $P$G
%Public% C:\Users\Public


The drive containing the Windows root directory, usually C:

The Windows root directory, usually C:\Windows

%TEMP% and %TMP%





Common Programming, Scripting, and Server Environment Variables


For command-line. Display current working directory or folder.

Display full path to the command-line

Scripting. Display current date in regional format.

Point to current error level, normally used to check error returned from previous command.


Point to the drive for current signed on user’s home folder. {SystemDrive}:\ {SystemDrive}:\


Hold the hostname of the server that authenticated the current user’s logon credentials. Windows Server.

Contains a semicolon-delimited list of directories in which the command interpreter will search for executable files.

Contains a semicolor-delimited list of extensions which are defined as exectable.

Display code for current command prompt format. $P$G $P$G


Return a random number between 0 and 32767.

Display current time in regional format.

Hold the name of the Workgroup or Windows Domain to which the current user belongs.

These are often sometimes referred to as "Environmental Variables" under Windows.
How do you see Environment variables in Windows 7? I am setting values and they don't show up either in Computer->Properties or in the Registry.