Windows: Environment Variables for Special Folders

A little note for self reference:

Variable

Description

%ALLUSERSPROFILE% Returns the location of the All Users Profile.
%APPDATA% Returns the location where applications store data by default.
%CD% Returns the current directory string.
%CMDCMDLINE% Returns the exact command line used to start the current Cmd.exe.
%CMDEXTVERSION% Returns the version number of the current Command Processor Extensions.
%COMPUTERNAME% Returns the name of the computer.
%COMSPEC% Returns the exact path to the command shell executable.
%DATE% 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% Returns the error code of the most recently used command. A non zero value usually indicates an error.
%HOMEDRIVE% Returns which local workstation drive letter is connected to the user's home directory.

Set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.
%HOMEPATH% Returns the full path of the user's home directory. Set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.
%HOMESHARE% Returns the network path to the user's shared home directory. Set based on the value of the home directory.

The user's home directory is specified in Local Users and Groups.
%LOGONSEVER% Returns the name of the domain controller that validated the current logon session.
%NUMBER_OF_PROCESSORS% Specifies the number of processors installed on the computer.
%OS% Returns the operating system name.

Windows 2000 displays the operating system as Windows_NT.
%PATH% Specifies the search path for executable files.
%PATHEXT% Returns a list of the file extensions that the operating system considers to be executable.
%PROCESSOR_ARCHITECTURE% Returns the chip architecture of the processor. Values: x86, IA64.
%PROCESSOR_IDENTIFIER% Returns a description of the processor.
%PROCESSOR_LEVEL% Returns the model number of the processor installed on the computer.
%PROCESSOR_REVISION% Returns the revision number of the processor.
%PROMPT% Returns the command prompt settings for the current interpreter. Generated by Cmd.exe.
%RANDOM% Returns a random decimal number between 0 and 32767. Generated by Cmd.exe.
%SYSTEMDRIVE% Returns the drive containing the Windows XP root directory (that is, the system root).
%SYSTEMROOT% Returns the location of the Windows XP root directory.
%TEMP% and %TMP% Returns the default temporary directories that are used by applications available to users who are currently logged on.

Some applications require TEMP and others require TMP.
%TIME% 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% Returns the name of the domain that contains the user's account.
%USERNAME% Returns the name of the user who is currently logged on.
%USERPROFILE% Returns the location of the profile for the current user.
%WINDIR% Returns the location of the operating system directory.

[ Source ]

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog