Configure the timeout used when stopping / starting services

The Service Control Manager (SCM) is responsible for handling the startup and stopping of services. The SCM starts a service by launching the service-application, and then expects to receive a started-message from the service within a certain timeout.

Set this REG-DWORD key in the registry to specify the timeout in milliseconds:

[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control]
ServicesPipeTimeout = 30000

More Info MS KB824344
More Info MS KB884495

The SCM stops a service by sending a stop-message to the service and then expects to receive a stopped-message from the service within a certain timeout. Set this REG-SZ key in the registry to specify the timeout in milliseconds:

[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control]
WaitToKillServiceTimeout = “20000”

More Info MS KB146092
More Info MS KB839262

Note if lowering the value too much it might cause improper shutdown of some services, which might lead to half-written / invalid / faulty data that will keep the service from starting properly again.

Note if having an UPS make sure it can supply enough power to support the shutdown of the machine properly, if increasing the value.

Related Control Application Timeout