Creating services in Windows 2008 using the SC tool

jlshakal
jlshakal used Ask the Experts™
on
This has been asked before, but I do not see where it was answered:

I have created a service using the "SC" tool in Windows 2008 launching an application from a batch file (due to the number of varibles the application starts with)

SC creates the following:

"e:\Program Files (x86)\IBM\Rational\DOORS Web Access\1.4.0.4\broker.start.bat\" --service"

But when starting the service, it returns the following error:

"Windows cound not start the Doors Broker service on xxxxx.  Error 1053:  The service did not respond to the start or control request in a timely fashion."

Does anyone have any ideas?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
When service manager launches process service it tries to talk with child process using special service API. Your batch file cannot respond that way so it is killed after timeout. You'll see the same result when you try to run notepad or freecell as a service. It will start then will be killed by service manager.
Only services (built and compiled special way) can work as a service. There are also some special services that can easily launch child processes. in NT times it was srvany.exe and now you can use task scheduler for your job. In my opinion task scheduler it is the best way for you. In Windows 2008 it can start your bat file just after starting your OS.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial