Windows 7 Operating System Custom Run Command (simple method 2)

Source: Internet
Author: User

After the last article, I believe that you will use the registry and environment variables to customize the running commands.

In fact, we know that both environment variables and the Registry store configuration information. Of course, environment variables mainly store path information. We configure environment variables to provide a path for the operating system so that its resource manager can quickly and conveniently access our information.

Based on this idea, we use a simpler method to customize the running command today.

We recall the previous method: set the path in the environment variable and set the executable file in the registry. This is equivalent to telling the resource manager about the executable file in the environment variable, that is, what we need to executeProgramIn which folder (directory), tell the operating system the specific file address through the registry. This is very troublesome and requires two steps. We will integrate these two steps today.

Step 1: We still need to tell the environment variable the path of the executable file. But here we certainly won't tell every program the environment variables separately, and we need to integrate all the paths.

Select a folder to store the directory information of all executable programs.

For example, my website is c: \ Users \ Administrator \ Documents \ link. This directory can be created by yourself.

Then I add it to the PATH environment variable.

Step 2: Compile the shortcuts for each executable program and place them in the directory of step 1.

As you can see, we use a BAT file as a shortcut. You can use a text editing tool such as NotePad to write a shortcut and save it *. bat is enough, and you can press the BAT file name you saved in the run to execute. The value is that all files configured in the pathenvironment variable can pass the runtime command. For example, mibaoka.swf can also be opened by hitting the file name (with the extension) under the running command.

The format of the BAT file is as follows:

From top to bottom, the red arrow points to the executable file drive letter, executable file directory, and the full name of the executable file.

Now, your custom running command is complete. Please try it!

14:44:47

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.