Names of some system environment variables

Top  Previous  Next

The system environment variables contain among other things the ones listed below.  A longer list can be found at http://kennethhunt.com/archives/000933.html.

 

CD

%CD%

current directory string.

COMPUTERNAME

%COMPUTERNAME%

name of the computer.

DATE

%DATE%

current date.

ERRORLEVEL

%ERRORLEVEL%

error code of the most recently used command.

HOMEPATH

%HOMEPATH%

path of user's home directory. .

NUMBER_OF_PROCESSORS

%NUMBER_OF_PROCESSORS%

number of processors installed on the computer.

OS

%OS%

OS name. Windows XP and Windows 2000 display as Windows_NT.

PATH

%PATH%

System specifies the search path for executable files.

TIME

%TIME%

current time

 

Note of caution: The following standard environment variables are not always available:

CD          

CMDCMDLINE  

CMDEXTVERSION

DATE        

ERRORLEVEL  

PROMPT      

RANDOM      

TIME