General discussion

Locked

Start of Services from Command Line

By Shanghai Sam ·
I am using net start "Service_Name " , command to use to start the services. Issue is some time I get the error "Could not stop the Service". And when I check in Service Manager, status of that particular service become "stopping" and unless I kill the service from Task manager , it remains the same.

Same behavior is not observed when I start and stop services using standard service manager.

Is there any way to overcome this error??

Please let me know if any further information is needed

Thanks,

-Pramod

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Start of Services from Command Line

by TimTheToolMan In reply to Start of Services from Co ...

Hi,

It possible its simply a timing issue. Stopping them from a script would be almost instantaneous for each service, but its possible that one service requires another to be running, only your script stops it before the first one can properly complete its stop.

Try putting pauses between each stop command to slow it down a little.

There is no native command in windows to pause a batch file for a specified time, but you can find a freebie at...

http://www.gammadyne.com/cmdline.htm#sleep

(remove spaces from the above URL)

Cheers,
Tim.

Back to Windows Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums