Each system may have a different path:
Desktop path: Echo%systemdrive%%homepath%\ desktop or "%userprofile%\desktop\hotfix.txt"
%homedrive% = c \ The partition where the system is currently started
%SystemRoot% = C:\WINDOWS The directory where the system is currently started
%windir% =%SystemRoot% = C:\WINDOWS The directory where the system is currently started
%USERPROFILE% = C:\User\ User name current user data variable
%homepath% = \user\ User name current user environment variable
%system% = C:\WINDOWS\SYSTEM32
%allusersprofile%: List Apricot no rofile file location.
%appdata%: Lists the default storage location for application data.
%cd%: Lists the current directory.
%clientname%: Lists the NetBIOS name of the client when joining to a Terminal Services session.
%cmdcmdline%: Lists the command line used to start the current Cmd.exe.
%cmdextversion%: Command out the current command handler extension version number.
%commonprogramfiles%: Lists the folder paths for commonly used files.
%computername%: The computer name is listed.
%comspec%: Lists the path to the executable command shell (command handler).
%date%: Lists the current date.
%errorlevel%: Lists the error codes for the most recently used commands.
%homedrive%: Lists the drive letter that resides with the user's home directory.
%homepath%: Lists the full path to the user's home directory.
%homeshare%: Lists the network path of the user's shared home directory.
%logonsever%: Lists the name of the domain controller that is valid for the current logon session.
%number_of_processors%: Lists the number of processors installed on the computer.
%os%: Lists the name of the operating system. (Windows XP and Windows 2000 are listed as WINDOWS_NT.)
%Path%: Lists the search paths for the executable files.
%pathext%: Lists the file name extensions that the operating system thinks can be executed.
%processor_architecture%: Lists the processor's chip architecture.
%processor_identfier%: A description of the processor is listed.
%processor_level%: Lists the model number of the computer's processor.
%processor_revision%: The revision number of the processor is listed.
%ProgramFiles%: Lists the path to the Program Files folder.
%prompt%: Lists the command prompt settings for the current command interpreter.
%random%: Lists the random decimal numbers bounded between 0 and 32767.
%sessionname%: Lists the connection and session name when connecting to a Terminal Services session.
%systemdrive%: Lists the drive where the Windows startup directory resides.
%SYSTEMROOT%: The location of the Windows startup directory is listed.
%temp% and%TMP%: Lists the default temporary directories for applications that are currently logged on by the user.
%time%: Lists the current time.
%userdomain%: Lists the name of the domain that contains the user account.
%USERNAME%: Lists the name of the user who is currently logged on.
%USERPROFILE%: Lists the current user profile location.
%WINDIR%: Lists the location of the operating system directory.
Variable type description
%allusersprofile% returns the location of the "All users" profile locally.
%appdata% Local returns the location by default where the application stores data.
%cd% returns the current directory string locally.
%cmdcmdline% Local returns the exact command line used to start the current Cmd.exe.
The%cmdextversion% system returns the version number of the current command handler extension.
The%computername% system returns the name of the computer.
The%comspec% system returns the exact path to the command-line interpreter executable program.
The%date% system returns the current date. Use the same format as the date/t command. Generated by Cmd.exe. For more information about the date command, see Date.
The%errorlevel% system returns the error code for the previous command. Errors are usually indicated by a value other than 0.
The%homedrive% system returns the local workstation drive letter that is connected to the user's home directory. Set based on the value of the home directory. The user home directory is specified in Local Users and groups.
The%homepath% system returns the full path of the user's home directory. Set based on the value of the home directory. The user home directory is specified in Local Users and groups.
The%homeshare% system returns the network path of the user's shared home directory. Set based on the value of the home directory. The user home directory is specified in Local Users and groups.
%logonserver% Local returns the name of the domain controller that verifies the current logon session.
The%number_of_processors% system specifies the number of processors installed on the computer.
The%os% system returns the operating system name. Windows 2000 displays its operating system as WINDOWS_NT.
The%PATH% system specifies the search path for the executable file.
The%pathext% system returns a list of file name extensions that the operating system considers executable.
The%processor_architecture% system returns the chipset architecture of the processor. Value: x86 or IA64 (Itanium-based).
The%processor_identfier% system returns the processor description.
The%processor_level% system returns the model number of the processor installed on the computer.
The%processor_revision% system returns the version number of the processor.
%prompt% returns the command prompt settings for the current interpreter locally. Generated by Cmd.exe.
The%random% system returns any decimal digits from 0 to 32767. Generated by Cmd.exe.
The%systemdrive% system returns the drive that contains the Windows server operating system root (that is, the root directory of the systems).
The%SYSTEMROOT% system returns the location of the Windows server operating system root directory.
The%temp% and%TMP% systems and users return the default temporary directory used by applications that are available to the currently logged-on user. Some applications require TEMP, while other applications require TMP.
The%time% system returns the current time. Use 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% returns the name of the currently logged on user locally.
%USERPROFILE% Local Returns the location of the current user's profile.
The%WINDIR% system returns the location of the operating system directory.
%temp% =%userprofile%\local Settings\Temp = C:\Documents and settings\sihochina\local settings\temp Current user Temp cache variable
------------------------------------------------------------------------
For example: The actual path of the%windir%\drives is the C:\WINDOWS\drives directory.
A variable is a quantity of meaning that has a relatively different value in a different environment but has the same convention in all environments.
These variables, can be entered in the Start menu-run, such as input%systemroot%, the system will open the C:\WINDOWS directory directly
Windows System Variables