Ask the Expert

Is there a way to stop/start non-MS services with a batch file prior to nightly backup?

In Windows 2000, is there a way to stop and start non-MS services with a batch file? Our backup software has an Exchange agent that is dependent upon a non-MS service being run. The service sometimes hangs, or spontaneously stops, and our Exchange backup fails. The software vendor is no help, so we'd like to be able to automate the process by stopping and starting the service every night prior to the backup. Thanks very much for any info.

    Requires Free Membership to View

Yes, it is. Just use the NET STOP command to stop the service (e.g., NET STOP SERVICENAME) and NET START to start the service when the backup is completed. If you're going to use the service's long name (e.g., a service name with a space in it) instead of its short name, be sure to put quotes around the command (e.g., NET STOP ?MY SERVICE?).

This was first published in March 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: