How to create a service running a .bat file on Windows 2008 Server?

Posted by abyx on Server Fault See other posts from Server Fault or by abyx
Published on 2009-08-16T06:53:26Z Indexed on 2012/04/03 11:32 UTC
Read the original article Hit count: 347

I've created the service using

sc create myService binpath=myservice.bat

But when I start it, it fails with the following error message:

[SC] StartService FAILED 1053:
    The service did not respond to the start or control request in a timely fashion.

On Win2k3 I used the srvany.exe from the Resource kit, but there's no resource kit for win2k8. For the time being I've installed the srvany.exe on my machine, but I don't think that's the best way to do it.

Thanks!

© Server Fault or respective owner

Related posts about Windows

Related posts about windows-server-2008