Change the startup order of Windows services

  
        

To change the boot order of Windows services, just modify the Windows registry. Registration information for any Windows service can be found under the HKEY_LOCAL_MacHINE\\
SYSTEM\\CurrentControlSet\\Services\\<Service Name>\\ key in the registry. The following describes the values ​​of several services related to the service startup sequence:

Group value: A value of type REG_SZ. It is used to describe which service group the service belongs to. If the service does not have this item, then it does not belong to any service group, and the system will load it by default after all services are started.

Tag value: A value of type REG_DWord. It is used to describe the identity of the service. Each service in the service group is assigned a unique identifier. The registry is arranged by the arrangement of the service identifiers of the service groups, and the loading order of the services in the same service group.

So, how to change the order in which services are started is now divided into two steps. One is to change the order in which the service groups are started. The second is to change the order in which the services in the service group are started.

First come to the first step: The list value of the HKEY_LOCAL_MacHINE\\SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder key of the registry stores information indicating the order in which the service group is started. Each service group is a string indicating the order in which the service groups are loaded by the order in which the strings are arranged in the values. To change the order in which service groups are loaded, just change their location. Method: Use Regedit32.exe (not, Regedit.exe, because, after double-clicking the List value here, you can only see the hexadecimal data, which is not convenient to modify.) Open the value, this is a character editing environment, change The order of the groups inside, then determine the changes. The order in which the service groups are started is fixed.

Second Step: The HKEY_LOCAL_MacHINE\\SYSTEM\\CurrentControlSet\\Control\\GroupOrderList key has information about the startup sequence of each service in each service group. Each service group information is saved as a value of type REG_BINARY, for example, the value of the Pointer Port service group is 030000000200000001000000030000000. For the convenience of observation, we will treat it as 03000000 02000000 01000000 030000000. It means that the Pointer Port service group has three services, the service with TAG value of 2 is loaded first, then the service with TAG value is 1, and finally the service with TAG value of 3. Load (the order of information interpretation is from left to right). To change the order in which a service is loaded in a group, just edit the binary string.

In addition, we can also change the loading order of services through the ChangeServiceConfig API or the sc.exe program (the tool in the Windows 2000 Resource Kit). I won’t go into details here.

Copyright © Windows knowledge All Rights Reserved