when creating a windows service that runs any cmd file then trying to start the service, get the following error. “error 1053: the service didn't respond to the start or control request in a timely fashion”
Steps to regenerate the issue:
Run cmd as an admin
sc create test01 binPath="C:\test.cmd"
Create a test.cmd file and put “echo test” in it
Start the test01 service in the windows services list
Googling the issue I got the following fixes:
https://support.microsoft.com/en-au/help/886695/you-receive-an-error-1053-the-service-did-not-respond-to-the-start-or this link recommends installing a hotfix but it’s for 2003 so it didn’t work on windows 10 (I can’t find one for windows 10 )
https://support.threattracksecurity.com/support/solutions/articles/1000071019-error-1053-the-service-did-not-respond-in-a-timely-fashion-when-attempting-to-start-stop-or-pause this link recommends changing the system registry to change the waiting time for a service to start, but when I applied it didn’t take an effect.