Environment Variables in Windows XP

Environment variables have long been used in computer operating systems and are present in Unix, DOS, and Windows The word "environment" used in the context here refers to various features of the computer system and certain basic system data. Here is one of Microsoft’s definitions:

Environment variables are strings that contain information such as drive, path, or file name. They control the behavior of various programs. For example, the TEMP environment variable specifies the location in which programs place temporary files.


Typical value (May vary, depending on system)

C:\Documents and Settings\All Users

C:\Documents and Settings\{username}\Application Data




\Documents and Settings\{username}


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

Directory containing program files, usually C:\Program Files

Code for current command prompt format. Code is usually $P$G

The drive containing the Windows XP root directory, usually C:

The Windows XP root directory, usually C:\Windows

%TEMP% and %TMP%


C:\Documents and Settings\{username}



Some dynamic environment variables

Current date in the format determined by the Date command

Current time in the format determined by the Time command

Current directory with its full path

Number defining exit status of a previous command or program

Random number between 0 and 32767


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s