Windows – Error 1053: The service did not respond to the start or control request in a timely fashion

servicewindows

I have an executable that I would like to set to run as a service. Using the sc.exe tool provided by windows (see KB article here: http://support.microsoft.com/kb/251192), I successfully "registered" the service. However, when I go to the Service Management Console (Start->Run->services.msc) and start the service, I get the following error:

Error 1053: The service did not respond to the start or control request in a timely fashion.

After reading around my initial impression is that service executables have to conform to an API, and that among the required functions/methods a service has to respond to are a start/stop/restart command. However, this seems to defeat the whole point of the sc.exe tool which is advertised with the ability to turn any executable into a service.

Can anyone shed some light on this for me?

Best Answer

This is the code you are looking for:

sc create SERVICENAME binPath= "cmd /c c:\programlocation\program.exe" 

It will not rid you of error 1053, but at least this will apply to the console (CMD) who already did the job of running the app in the background (check task manager to confirm).