Win7 How to run the script on boot

Source: Internet
Author: User

In order for the specified script or program to be executed immediately when the system is powered on, the Win7 system can be implemented in the following ways:

    • Make the script or program start running only once, and no longer run after the second boot

By modifying the registry to achieve this goal, the method involves the registry:


    1. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

    2. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

Create a new string value under the registry key, define the name yourself, fill in the data as the full path of the script or program that you want to start running, such as:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/84/3E/wKiom1eJsfXQAEzgAABwv9FKiSE466.png-wh_500x0-wm_3 -wmp_4-s_362753377.png "title=" Untitled. png "alt=" wkiom1ejsfxqaezgaabwv9fkise466.png-wh_50 "/>

The programs that are defined in these two registry keys run in the order first 1 after 2, the registry key 1 is executed first, and 2 is executed after the


    • Let the script run every time you start

3. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

The value of the Userinit key under this registry entry specifies the program or script to be executed after the system starts, you can specify multiple programs, multiple programs are split in ",", which is the path to the program that you can specify that will execute first.

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/84/3E/wKioL1eJs62zhxvlAABceprMLO4823.png-wh_500x0-wm_3 -wmp_4-s_1067334948.png "title=" Untitled. png "alt=" wkiol1ejs62zhxvlaabceprmlo4823.png-wh_50 "/>

4. HKEY_CURRENT_USER\Software\Microsoft\Windows Nt\currentversion\windows\load

5. Hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer\run

You can create a new manual without this key value

6. Hkey_current_user\software\microsoft\windows\currentversion\policies\explorer\run

You can create a new manual without this key value

7. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

8. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

9. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Ten. C:\users\*\appdata\roaming\microsoft\windows\start Menu\Programs\Startup

Items 9th and 10th can be run automatically after each boot, as long as the program is placed under the corresponding directory.


The registry entries or directories listed above are executed sequentially when the system executes, and the order of each boot run method is arranged in the order of the system execution. When the power-on is included in the run and run only once each time, the system run sequence is: 3 1 4 5 6 7 8 9 10 2


This article is from the "can't remember the former Cup of Wine" blog, please be sure to keep this source http://9429042.blog.51cto.com/9419042/1826945

Win7 How to run the script on boot

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.