Windows variable set

Source: Internet
Author: User

// View the system variable value: [Example] echo % SystemRoot %

% Homedrive % = c: \ partition of the currently started System
% SystemRoot % = c: \ directory of the system currently started by Windows
% WINDIR % = % SystemRoot % = c: \ directory of the system currently started by Windows
% USERPROFILE % = c: \ Documents ents and Settings \ sihochina current user data variable
% Homepath % = c: \ Documents ents and Settings \ sihochina current user environment variable
% System % = c: \ windows \ system32

 

% Temp % = % USERPROFILE % \ Local Settings \ temp = C: \ Documents ents and Settings \ sihochina \ Local Settings \ Temp current user temp cache variable
------------------------------------------------------------------------
For example, the actual path of % WinDir % \ drives is the C: \ WINDOWS \ drives directory.
A variable refers to the amount of data that has relatively different values in different environments, but has the same meaning in all environments.
You can enter these variables in Start Menu-run. For example, if you enter % SystemRoot %, the system will directly open the C: \ Windows directory.
If your current system is installed on disk D 2000, the execution result of the above variable is to open the D: \ WINNT directory.

 

% Allusersprofile %: list all user profile file locations.
% Appdata %: List applications Program The default data storage location.
% Cd %: list the current directory.
% Clientname %: list the NetBIOS names of clients connected to a terminal service session.
% Cmdcmdline %: indicates the command line used by cmd.exe before startup.
% Cmdextversion %: indicates the extended version number of the current command handler.
% Commonprogramfiles %: lists the folder paths of common files.
% Computername %: Lists computer names.
% Comspec %: lists the paths of the executable command shell (command handler.
% Date %: list the current date.
% Errorlevel %: Error listing recent commands Code .
% Homedrive %: Lists drive letters with the user's home directory.
% Homepath %: list the full path of the user's main directory.
% Homeshare %: lists the network paths of the user's shared home directory.
% Logonsever %: lists the domain name controller names of valid current logon sessions.
% Number_of_processors %: list the number of processors installed on the computer.
% OS %: list operating system names. (Windows XP and Windows 2000 are listed as windows_nt .)
% PATH %: lists the search paths of executable files.
% Pathext %: list the file extensions that the operating system deems executable.
% Processor_architecture %: list the processor's chip architecture.
% Processor_identfier %: lists the processor descriptions.
% Processor_level %: lists the computer processor models.
% Processor_revision %: indicates the revision number of the processor.
% ProgramFiles %: lists the paths of the Program Files folder.
% Prompt %: lists the command prompt settings of the current command interpreter.
% Random %: list the random decimal numbers between 0 and 32767.
% Sessionname %: lists the connection and session names used to connect to a terminal service session.
% Systemdrive %: The drive where the Windows startup directory is located is listed.
% SystemRoot %: the location of the Windows startup directory is listed.
% Temp % and % TMP %: lists the default temporary directories of currently logged-on user available applications.
% Time %: list the current time.
% Userdomain %: lists the names of domains containing user accounts.
% Username %: lists the names of users currently logged on.
% USERPROFILE %: list the location of the current user profile file.
% WINDIR %: list the location of the operating system directory.

Variable type description
% Allusersprofile % returns the location of the "All users" configuration file locally.
% Appdata % local return the location where the application stores data by default.
% Cd % returns the current directory string locally.
% Cmdcmdline % local return the exact command line used to start the current cmd.exe.
% Cmdextversion % The system returns the version number of the current "command handler extension.
% Computername % the name of the computer returned by the system.
% Comspec % The system returns the exact path of the executable program of the command line interpreter.
% Date % The 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.
% Errorlevel % The system returns the error code of the previous command. A non-zero value is usually used to indicate an error.
% Homedrive % The system returns the local workstation drive letter that is connected to the user's home directory. Set Based on the main directory value. The user home directory is specified in "local users and groups.
% Homepath % The system returns the complete path of the user's home directory. Set Based on the main directory value. The user home directory is specified in "local users and groups.
% Homeshare % The system returns the network path of the user's shared home directory. Set Based on the main directory value. The user home directory is specified in "local users and groups.
% Logonserver % local return the name of the domain controller that verifies the current logon session.
% Number_of_processors % Number of processors installed on the computer.
% OS % The system returns the operating system name. Windows 2000 displays windows _ NT as its operating system.
% PATH % The system specifies the search path of the executable file.
% Pathext % The system returns a list of file extensions that the operating system deems executable.
% Processor_architecture % The system returns the processor's chip architecture. Value: x86 or IA64 (based on itanium ).
% Processor_identfier % The system returns the processor description.
% Processor_level % The system returns the model of the processor installed on the computer.
% Processor_revision % The system returns the processor version number.
% Prompt % the command prompt settings of the current interpreter are returned locally. Generated by cmd.exe.
% Random % The system returns any decimal number between 0 and 32767. Generated by cmd.exe.
% Systemdrive % The system returns a drive containing the Windows server operating system root directory (that is, the system root directory.
% SystemRoot % The system returns the location of the Windows server operating system root directory.
% Temp % and % TMP % the system and the user return the default temporary directory used by the applications available to the current login user. Some applications require temp, while other applications require TMP.
% Time % The 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 return the name of the domain containing the user account.
% Username % returns the name of the user currently logged on.
% USERPROFILE % returns the location of the configuration file of the current user locally.
% WINDIR % the location of the operating system directory returned by the system.

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.