Discussion Locked

Scheduled shutdown of FTP and W3 ?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hey there. Any ideas on how I would write a batch file that would shutdown my FTP and W3 services, and then a different one to start? I already have a great scheduler written that will run a batch for me whenever I tell it to.
Any help would sorely be appreciated.

5 replies

by syscokid

You can use the "net stop" and "net start" commands in a batch file to stop and start services.

The command is
net stop servicename
and
net start servicename

by cricket_moon

I got the net stop/start, thanks. But the problem is that I don't know what the service namce is supposed to be. I type net stop ftp services, and it returns a "NET STOP service" and that's it.

by ewing bettles

Answer 1's completely correct. If you're having trouble with the service name part, open your Services control panel applet (or MMC if Win2000) and see what is listed for NAME of the service you want. Use this value exactly as shown, if there are any spaces within the Service Name you will need to enclose the service name in quotes. Another way to get a list of the Service names as recognized by NT is to run NET START without any parameters from a command line - this will list all started services on your machine.

Examples:

NET START "FTP Publishing Service"
NET STOP "FTP Publishing Service"

Good luck, -Ewing

This discussion is closed to new replies.