The role of environment variables, why set environment variables?

Source: Internet
Author: User

We usually open an application, usually double-click the desktop icon or in the Start menu link, whether the Desktop shortcut icon or menu link contains the application installation location information, open them when the system will follow these location information to find the installation directory and then start the program, such as QQ:

     know an Application installation directory location, we can also be opened through the command line tools, such as the author of the location of QQ: " C:\Program Files (x86) \tencent\qq\qqprotect\bin\qqprotect.exe ", QQ application name is QQProtect.exe, then we open command line tool Win+r ->> cmd ->> CD c:\program Files (x86) \tencent\qq\qqprotect\bin\ , use the CD command to enter the directory, and then enter "Qqprotect", you can run QQ;

Edit the system variable name "path" and append the QQ installation directory after the "path" variable value: "; C:\Program Files (x86) \tencent\qq\qqprotect\bin\ "Note that in addition to the directory string in front of an English semicolon";", the English semicolon is used to separate paths within the path;

OK after saving, then go back to the command window, no matter in any directory, you just enter qqprotect (case-insensitive, written qqprotect perhaps) command, QQ will start;

You can also create a new user variable, such as a new user variable called "QQ", the variable value is the installation directory of QQ "C:\Program Files (x86) \tencent\qq\qqprotect\bin\"

At this time, modify the path of the QQ installation directory, from "C:\Program Files (x86) \tencent\qq\qqprotect\bin\" modified to%qq%;

In the command window to enter "Qqprotect", can still start QQ, that is, we can use a certain user variable name on each side with a percent semicolon, such as: "%qq%", to replace the variable name pointed to the value of the variable.

----------------------------the dividing line (and then review the concept and purpose of the environment variable)----------------------------

    Environment is an object with a specific name in the operating system, which contains one or more applications program The information that will be used. For example, the PATH environment variable in Windows and DOS operating systems, when the system is required to run a program current directory variable to better run the process.

a lot of friends will be in their ownComputerInstall Windows 7 on a dual system, such as the C-drive installation Windows Xp,d disk. But someSoftwareoften installed only on Windows XP systems, the Windows 7 system does not work properly because it is often necessary to copy some files to the system directory while using another system, which cannot be run because of the lack of these files . A more troublesome but effective way is to install it again. When we understand the environmentVariablecan be used to solve the dual-systemSoftwareshared issues.



The role of environment variables, why set environment variables?

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.