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:
By modifying the registry to achieve this goal, the method involves the registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
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
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