Serving Stopping after they have been started through command line

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

I'm trying to start a service through a command line

net start (service name)

The service starts ok and reports its started, (i even
checked through MMC to see that it did start.

after half a second the service then stops, there is no
report from the net program that the service stopped, it
just stops.

I pipe net start (service name) > output.txt and it only
says the service is starting, the service started
successfully.

For some reason this service is just stopping. I can
start it and it stays running through MMC but I need to
start the service through a batch script so it MUST be
command line.

This service isn't a native service of windows but works
fine if set to auto when windows starts.

Anyone heard of this happening and how to fix this
problem?
 
Lots of things can happen when the program isn't designed
to act as a service. What net start does is tell the
Service Control Manager to send a "hey, start now" signal
to the file registered as the service. What the
service/app does after that is up to it - in certain
instances it may just return and therefore "stop" the
service.
 
It sends the same control, so all else being equal, yes.
It's possible the method you're using to make it a
service is not handling things correctly in certain
cases - there's a million things that could be happening,
and unfortunately, if it's not originally designed to be
a service, there's not really a good guarantee that
things will work 100% of the time.
 
Back
Top