Wednesday, June 24, 2009

How to change service start type in the registry

Sometimes it may be necessary to change a service start type from the registry instead of the GUI. This may be due to the system or the GUI being inaccessible, or because of a need to change startup as part of a script.

While the system is live the service information is kept in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. Each service and driver is listed under its own key.

CurrentControlSet exists only while the system is running. If you are troubleshooting a system which is offline by booting from a parallel install, etc. the last CurrentControlSet settings are saved under ControlSet001. This branch is reloaded as the CurrentControlSet on the next boot, so values changed in ControlSet001 on an offline system will become active as CurrentControlSet the next time the downed system is brought online.

Service startup types are saved in the registry value (DWORD) Start under the corresponding service name. This value can be set to any of the following:

0x0 Boot
0x1 System
0x2 Automatic
0x3 Manual
0x4 Disabled

Note that Boot (0) and System (1) are reserved for device drivers. Regular services should not be set to these start types.



Mixomania mixomania.tk mixomania.blogpsot.com mixomania.co.cc mixomania.co.cc

Related Posts by Categories



0 comments: