Common predefined environment variables in Windows XP
======================================
Variable |
Typical value (may vary, depending on System) |
% Allusersprofile % |
C: \ Documents ents and Settings \ All Users |
% Appdata % |
C: \ Documents ents and Settings \{Username}\ Application Data |
% Computername % |
{Computername} |
% Comspec % |
C: \ windows \ system32 \ cmd.exe |
% Homedrive % |
C: |
% Homepath % |
\ Documents and Settings \{Username} |
% PATH % |
C: \ windows \ system32 \; C: \ WINDOWS \; c: \ windows \ system32 \ WBEM |
% Pathext % |
. Com;. EXE;. BAT;. CMD;. vbs;. VBE;. js;. WSF;. wsh |
% ProgramFiles % |
Directory containing program files, usually c: \ Program Files |
% Prompt % |
Code for current command prompt format. Code is usually $ p $ G |
% Systemdrive % |
The drive containing the Windows XP root directory, usually C: |
% SystemRoot % |
The Windows XP root directory, usually C: \ WINDOWS |
% Temp % and % TMP % |
C: \ release E ~ 1 \{Username}\ Locals ~ 1 \ Temp |
% Username % |
{Username} |
% USERPROFILE % |
C: \ Documents ents and Settings \{Username} |
% WINDIR % |
C: \ WINDOWS |
Some Dynamic Environment Variables
======================================
Variable |
Value |
% Date % |
Current date in the format determined byDateCommand |
% Time % |
Current Time in the format determined byTimeCommand |
% Cd % |
Current Directory with its full path |
% Errorlevel % |
Number defining exit status of a previous command or program |
% Random % |
Random number between 0 and 32767 |
Common predefined environment variables in Windows Vista/7
======================================
Variable |
Typical value (may vary, depending on System) |
% Allusersprofile % |
C: \ programdata |
% Appdata % |
C: \ Users \(Username}\ Appdata \ roaming |
% Commonprogramfiles % |
C: \ Program Files \ common files |
% Computername % |
{Computername} |
% Comspec % |
C: \ windows \ system32 \ cmd.exe |
% Homedrive % |
C: |
% Homepath % |
\ Users \{Username} |
% Localappdata % |
C: \ Users \{Username}\ Appdata \ Local |
% PATH % |
Varies. schemdes c: \ windows \ system32 \; C: \ WINDOWS \; c: \ windows \ system32 \ WBEM |
% Pathext % |
. Com;. EXE;. BAT;. CMD;. vbs;. VBE;. js;. WSF;. wsh;. MSC |
% Programdata % |
C: \ programdata |
% ProgramFiles % |
Directory containing program files, usually c: \ Program Files |
% ProgramFiles (x86) % |
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 |
% Systemdrive % |
The drive containing the Windows XP root directory, usually C: |
% SystemRoot % |
The Windows XP root directory, usually C: \ WINDOWS |
% Temp % and % TMP % |
C: \ Users \{Username}\ Appdata \ Local \ Temp |
% Username % |
{Username} |
% USERPROFILE % |
C: \ Users \{Username} |
% WINDIR % |
C: \ WINDOWS |
Source:
Environment variables in Windows XP
Http://vlaurie.com/computers2/Articles/environment.htm
Environment variables in Windows Vista and Windows 7
Http://vlaurie.com/computers2/Articles/environment-variables-windows-vista-7.htm