Understanding Windows XP’s environment variables

Understanding Windows XP’s environment variables

Takeaway:
Windows XP’s environment variables control the behavior of batch files and
programs, and also control the way Windows XP and the MS-DOS subsystem
appears and works. Check out this list of environment variables, along with
their descriptions.

Environment variables are used to control the behavior of batch files and
programs in Windows XP; they also control the way Windows XP and the MS-DOS
subsystem appears and works. To see a complete list of the environment
variables that are active on a Windows XP system, follow these steps:

1.. Open a Command Prompt window.
2.. Type Set and press [Enter].
You’ll see a list of the current environment variable settings. While some
of them are familiar, such as PATH, and some are easy to figure out, such as
COMPUTERNAME, others are more cryptic. Here’s a sampling of Windows XP’s
environment variables:

a.. ALLUSERSPROFILE: Lists the location of the All Users Profile.
b.. APPDATA: Lists the location where applications store data by
default.
c.. CD: Lists the current directory string.
d.. CLIENTNAME: List the client’s NETBIOS name when connected to
terminal server session.
e.. CMDCMDLINE: Lists the command line used to start the current
cmd.exe.
f.. CMDEXTVERSION: Lists the version number of the current Command
Processor Extensions.
g.. CommonProgramFiles: Lists the path to the Common Files folder.
h.. COMPUTERNAME: Lists the name of the computer.
i.. COMSPEC: Lists the path to the command shell executable.
j.. DATE: Lists the current date.
k.. ERRORLEVEL: Lists the error code of the most recently used command.
l.. HOMEDRIVE: Lists the drive letter is connected to the user’s home
directory.
m.. HOMEPATH: Lists the full path of the user’s home directory.
n.. HOMESHARE: Lists the network path to the user’s shared home
directory.
o.. LOGONSEVER: Lists the name of the domain controller that validated
the current logon session.
p.. NUMBER_OF_PROCESSORS: Lists the number of processors installed on
the computer.
q.. OS: Lists the name of the operating system. (Windows XP and Windows
2000 list the operating system as Windows_NT.)
r.. Path: Lists the search path for executable files.
s.. PATHEXT: Lists the file extensions that the operating system
considers to be executable.
t.. PROCESSOR_ARCHITECTURE: Lists the processor’s chip architecture.
u.. PROCESSOR_IDENTFIER: Lists the description of the processor.
v.. PROCESSOR_LEVEL: Lists the model number of the computer’s processor.
w.. PROCESSOR_REVISION: Lists the revision number of the processor.
x.. ProgramFiles: Lists the path to the Program Files folder.
y.. PROMPT: Lists the command-prompt settings for the current
interpreter.
z.. RANDOM: Lists a random decimal number between 0 and 32767.
aa.. SESSIONNAME: Lists the connection and session names when connected
to terminal server session.
ab.. SYSTEMDRIVE: Lists the drive containing the Windows root directory.
ac.. SYSTEMROOT: Lists the location of the Windows root directory.
ad.. TEMP and TMP: List default temporary directories for applications
that are available to users who are currently logged on.
ae.. TIME: Lists the current time.
af.. USERDOMAIN: Lists the name of the domain that contains the user’s
account.
ag.. USERNAME: Lists the name of the user currently logged on.
ah.. USERPROFILE: Lists the location of the profile for the current
user.
ai.. WINDIR: Lists the location of the OS directory.

Comments are closed.