
When Windows starts, a lot of programs usually start automatically. Don't think that everything will be fine if you manage the "Start/Programs/Startup" menu. In fact, there are many ways to make Windows start programs automatically in Windows XP/2K. Here are the two most important folders and eight registration keys.
1、 Startup folder specific to the current user
This is a common location for many applications to start automatically. Windows automatically starts all shortcuts placed in this folder. The user startup folder is generally in: Documents and Settings <User Name> Start Menu Program Startup, where "<User Name>" is the name of the user account currently logged in.
2、 Startup folder valid for all users
This is the second important place to find the automatic startup program. No matter what identity the user uses to log in to the system, the shortcut placed in this folder is always automatically started, which is the difference between it and the user specific startup folder. This folder is usually started at: Documents and Settings All Users Start Menu Programs .
3、 Load registration key
There is not much information about the registration key. In fact, it can automatically start the program. Location: HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Windows\load。
4、 Userinit registration key
Location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\Userinit。 The program can also be initialized automatically when the system starts. Usually there is a userinit.exe under the registration key, as shown in Figure 1, but this key allows you to specify multiple programs separated by commas, such as "userinit.exe, OSA.exe" (without quotation marks).
5、 Explorer Run Registration Key
Unlike load and Userinit, the Explorer Run key is available under HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. The specific location is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run, And HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion Policies Explorer Run.
6、 RunServicesOnce Registration Key
The RunServicesOnce registration key is used to start the service program. The start time is before the user logs in, and it is prior to other programs started through the registration key. The location of the RunServicesOnce registration key is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce, And HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion RunServicesOnce.
7、 RunServices Registration Key
The program specified by the RunServices registry key runs immediately after the program specified by RunServicesOnce, but both run before the user logs in. The location of RunServices is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices, And HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion RunServices.
8、 RunOnce Setup Registration Key
RunOnce Setup specifies the program to run after the user logs in. Its location is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup, And HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion RunOnce Setup.
9、 RunOnce Registration Key
The installer usually uses the RunOnce key to automatically run the program. Its location is HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion RunOnce and HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion RunOnce. The RunOnce key under HKEY_LOCAL_MACHINE will run the program immediately after the user logs in, and the running time is before the program specified by other Run keys. The RunOnce key under HKEY_CURRENT_USER runs after the operating system processes other Run keys and the contents of the Startup folder. If it is XP, you also need to check HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion RunOnceEx.
10、 Run Registration Key
Run is the most commonly used registration key for automatically running programs. The location is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run, And HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion Run. The Run key under HKEY_CURRENT_USER runs immediately after the Run key under HKEY_LOCAL_MACHINE, but both of them run before the Start folder is processed.
//Find Startup Folder
import fsys;
startup = fsys.getSpecial(0x0007 /*_CSIDL_STARTUP*/ )
io.print( startup )