China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 13:51
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Who can list things like %temp%, %windir%, SystemRoot% and so on? View 3,171 Replies 18
Floor 16 Posted 2007-01-30 09:07 ·  中国 福建 三明 电信
新手上路
Credits 8
Posts 5
Joined 2006-11-25 05:53
19-year member
UID 71670
Gender Male
Status Offline
Seems like this?
%systemroot%\help\ntcmds.chm
Floor 17 Posted 2007-01-30 09:15 ·  中国 福建 三明 电信
新手上路
Credits 8
Posts 5
Joined 2006-11-25 05:53
19-year member
UID 71670
Gender Male
Status Offline
```
The following table lists the system and local environment variables of Windows XP.

Variable Type Description
%ALLUSERSPROFILE% Local Returns the location of all "user profiles".
%APPDATA% Local Returns the location where applications store data by default.
%CD% Local Returns the current directory string.
%CMDCMDLINE% Local Returns the exact command line used to start the current Cmd.exe.
%CMDEXTVERSION% System Returns the version number of the current "command processor extension".
%COMPUTERNAME% System Returns the name of the computer.
%COMSPEC% System Returns the exact path of the command line interpreter executable.
%DATE% System Returns the current date. Uses the same format as the date /t command. Generated by Cmd.exe. For more information about the date command, see Date.
%ERRORLEVEL% System Returns the error code of the most recently used command. Usually indicates an error with a non-zero value.
%HOMEDRIVE% System Returns the local workstation drive letter connected to the user's home directory. Based on the setting of the home directory value. The user's home directory is specified in "Local Users and Groups".
%HOMEPATH% System Returns the full path of the user's home directory. Based on the setting of the home directory value. The user's home directory is specified in "Local Users and Groups".
%HOMESHARE% System Returns the network path of the user's shared home directory. Based on the setting of the home directory value. The user's home directory is specified in "Local Users and Groups".
%LOGONSEVER% Local Returns the name of the domain controller that authenticates the current login session.
%NUMBER_OF_PROCESSORS% System Specifies the number of processors installed on the computer.
%OS% System Returns the name of the operating system. Windows 2000 displays the operating system as Windows_NT.
%PATH% System Specifies the search path for executable files.
%PATHEXT% System Returns the list of file extensions that the operating system considers executable.
%PROCESSOR_ARCHITECTURE% System Returns the chip architecture of the processor. Values: x86, IA64.
%PROCESSOR_IDENTFIER% System Returns the processor description.
%PROCESSOR_LEVEL% System Returns the model of the processor installed on the computer.
%PROCESSOR_LEVEL% System Returns the version number of the processor.
%PROMPT% Local Returns the command prompt setting of the current interpreter. Generated by Cmd.exe.
%RANDOM% System Returns any decimal number between 0 and 32767. Generated by Cmd.exe.
%SYSTEMDRIVE% System Returns the drive that contains the Windows XP root directory (i.e., the system root directory).
%SYSTEMROOT% System Returns the location of the Windows XP root directory.
%TEMP% and %TMP% System and User Returns the default temporary directory used by applications available to the current logged-on user. Some applications need TEMP, while others need TMP.
%TIME% System Returns the current time. Uses the same format as the time /t command. Generated by Cmd.exe. For more information about the time command, see Time.
%USERDOMAIN% Local Returns the name of the domain that contains the user account.
%USERNAME% Local Returns the name of the currently logged-on user.
%UserPrefix% Local Returns the location of the current user's profile.
%WINDIR% System Returns the location of the operating system directory.



[ Last edited by gues1688 on 2007-1-29 at 08:20 PM ]
```
Floor 18 Posted 2007-01-30 21:54 ·  中国 山东 联通
新手上路
Credits 12
Posts 6
Joined 2006-12-21 04:25
19-year member
UID 74106
Gender Male
Status Offline
Pass by, study, study
Floor 19 Posted 2007-01-30 22:42 ·  中国 浙江 温州 乐清市 电信
新手上路
Credits 7
Posts 4
Joined 2007-01-22 09:37
19-year member
UID 77327
Gender Male
Status Offline
Got it, thank you...........
Forum Jump: