MGS
Posts: 124
Joined: Tue Oct 04, 2022 9:52 am

Service start timeout

Hi,

How to decrease the "service could not be started" timeout, which happens when there is a problem with starting the service during the installation?

Best regards,
Johannes
Catalin
Posts: 6782
Joined: Wed Jun 13, 2018 7:49 am

Re: Service start timeout

Hello Johannes,

As far as I'm aware, we can not decrease the time as that's all controled by the "Start Services" standard action.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6782
Joined: Wed Jun 13, 2018 7:49 am

Re: Service start timeout

It would be possible, though, through some registry modifications.

Windows Service "Timeout" instantly on startup

Not quite sure how helpful this is, just thought of leaving it here just in case.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MGS
Posts: 124
Joined: Tue Oct 04, 2022 9:52 am

Re: Service start timeout

Hi Catalin,

Thanks, with the link and some PowerShell I'm able to easily set a lower timeout during install and reset the timeout when the install is complete/failed. Note that this may need to be executed as administrator. Currently I'm aiming for a different way - giving the user the choice to start/not start the service - so I'm just leaving this snippet here as a reference for others.

To set a service timeout (all services) of 20 seconds using PowerShell:

Code: Select all

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name ServicesPipeTimeout -Value 20000 -Type DWord
An interesting read: https://learn.microsoft.com/en-us/troub ... -out-error

Best regards,
Johannes
Catalin
Posts: 6782
Joined: Wed Jun 13, 2018 7:49 am

Re: Service start timeout

Hello Johannes,

You are always welcome!

I thank you, too, for sharing the solution with us. :)

I am sure this will be of help for further users facing a similar scenario.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”