Environment Variables on Windows

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.