Start or Stop Window Services using Batch file in Vista/XP/2003/2000

If you're new here, you may want to subscribe to our RSS feed. Thanks for visiting!


Many times people forget what the services do or forget to restart the important ones. Services can be easily changed by creating batch files.

The important commands are the following

NET START - starts the service
NET STOP - ends the service

Before starting this we need to make sure which service you want to start or stop.

Go to Start—>Run type services.msc click ok

Once you get the services windows you can see each service name.

Stop Window Services using Batch file

The following one is just example

First you need to open a notepad enter the following commands and save as stopservice.bat

NET STOP “Error Reporting Service”
NET STOP “FTP Publishing Service”
NET STOP “Messenger”

The above commands stop the following services

“Error Reporting Service”
“FTP Publishing Service”
“Messenger”

The same way you need to start the services using the following procedure you need to open a notepad enter the following commands and save as startservice.bat

NET START “Error Reporting Service”
NET START “FTP Publishing Service”
NET START “Messenger”

The above commands start the following services

“Error Reporting Service”
“FTP Publishing Service”
“Messenger”

Related Articles


Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.

Trackbacks & Pingbacks

No trackbacks/pingbacks yet.

Comments

Hi, this is Rajasekaran from India, I need a small help about the Bat file. I want to automatically restart to sever by using bat file. Pls let me known the service is whether technical possible or not. If it is possible Pls give the cmd for the same. Thanks and Regards, D.Rajasekaran.

try this

just create a batch file and put the following command

Shutdown -r -f -t 0 (This is for local computer)

for network computer

Shutdown -r -f -t 0 -m \\

-r = restart
-s = shutdown
-f = forcibly
-t = time in seconds
-m = remote computer

It doesn’t work in vista. Error 5 returns. The access deny.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)