Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi guys

 

A really easy one for the experts out there,

 

I am trying to write a really simple script as a batch file that can be ran as a scheduled task. I want one script to stop a service and another to start a service. I have used the following but it doesnt work:

 

NET STOP

 

"Facility Data Server"

 

Pause

 

(I added the pause so I could see what was going wrong)

 

I presume I have missed something somewhere. Could someone please advise?

 

PS I have triple checked I have the service name correct and that it is running.

 

Please see attachment for the error.

 

Thanks in advanceservice_stop_error.JPG

Posted

Cheers guys, probably the most simple mistake to make, however in my defence, isnt it really daft that in that dos window it shows the example format at NET STOP and then 'service' on a new line??

 

Thanks, I now have nice and easy service restarts!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...