Windows Common Environment variables

Source: Internet
Author: User

%allusersprofile%
Lists the location of all user profile files.

%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 lines 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%
Lists the computer names.

%comspec%
Lists the paths to executable command shells (command handlers).

%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.

Desktop
%homedrive%%homepath%\ Desktop

Start Menu:
%homedrive%%homepath%\"Start Menu

%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. (windowsxp and Windows2000 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%
Lists the description of the processor.

%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 ProgramFiles 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 drives where the Windows startup directory resides.

%SYSTEMROOT%
Lists the location of the Windows startup directory.

%temp% or%tmp%
Lists the default temporary directories for available applications for the currently logged-on 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%
List the location of the operating system directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.