Question : Stopping and stopping Service from the command line

In order to backup a program folder at the end of each business day I need to first stop on of the programs dependent services that is running in the background. Then I run the xcopy command from within a batch file as part of a scheduled task. And then restart the service so that the program will run again in the morning when it is restarted for the new business day.

How can I stop the service  and then restart it from within the batch file? If it cannot be done within a batch file, how might it be acchomplished in an automated fashion so as to run as part of a schedule task at the end of each business day. Please be specific as to the command structure that would be used.

Answer : Stopping and stopping Service from the command line

You can use the net stop and net start commands:

net stop
net start

Hope this helps!

:o)

Bartender_1
Random Solutions  
 
programming4us programming4us