The abbreviated environment variable for Windows System directories is to create a simple abbreviation for the paths of common and fixed windows system directories to make it easier to enter or locate. By default, Windows systems are installed in the Windows directory of drive C on the computer, but this is not fixed. If your system is not installed in this directory, if the program wants to locate a system directory, you need to use the abbreviated environment variable in the directory. With these environment variables, programmers or system administrators can easily find the system directory path they want to use without having to know your system installation location in advance.
Below, I will introduce some common environment variables for the abbreviated Windows System directory: % systemdrive %
This indicates the disk partition of the Windows system, that is, the root directory of the drive letter installed on the Windows system, which is usually the root directory of the C disk. % Homedrive %
This is the same as the % systemdrive % feature described above. % SystemRoot %
It points to the directory of the Windows system, usually c: \ windows. % WINDIR %
Similar to % SystemRoot %, it points to the directory where windows is located. % ProgramFiles %
The path to program files, usually c: \ Program Files. % Commonprogramfiles %
Point to the common files directory, usually c: \ Program Files \ common files. % USERPROFILE %
Point to the user directory of the current account, usually c: \ Users and Settings \ current user name. % Homepath %
The function is the same as % USERPROFILE % above. % Allusersprofile %
Point to the user directories of all users, usually c: \ Users and Settings \ all users. % Appdata %
Point to the current user's application data directory, usually c: \ Documents ents and Settings \ current user name \ Application Data. Many articles will introduce a variable named % allappdata %, which points to c: \ Documents ents and Settings \ All Users \ Application Data, but this variable cannot be used. % Temp %
It points to the temporary file directory of the current user, usually c: \ Documents and Settings \ current user name \ Local Settings \ temp. % TMP %
And % Temp % point to the same. % Comspec %
Point to c: \ windows \ system32 \ cmd.exe, that is, the command prompt.
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