Thursday, April 24, 2014

Creating Batch file to Start and Stop the Window services

Windows  services are a very important part of windows environment. We can easily change the windows environment by stopping or starting the services, for example boost the system performance by stopping the multiple services during game playing.

Warning: Manipulating windows services can have some unwanted effects on your system. You should create a system restore point before experimenting.

We can easily changed the service state by creating batch file(.bat) having batch commands for start or stop the service. The important commands are the following-

  •  Net Stop- For stopping the service.
  • Net Start- For Starting the service.
Note:-The batch file will need to be run as administrator.

For Example, I have taken the "Print Spooler" service to start through the batch file. Service name of "Print Spooler" service is "Spooler".

  • "Print Spooler" Service before executing the batch file.
    Creating Batch file to Start and Stop the Window services
  • Write the below command on the notepad and save the file with .Bat estension.
           Net Start "Spooler"
  • Execute the batch file as administrator.
    Creating Batch file to Start and Stop the Window services
  • "Print Spooler" Service after executing the batch file.
Creating Batch file to Start and Stop the Window services

I hope this article will be helpful for you. I would like to have any feedback from you. Your valuable feedback, question, or comments about this article are always welcome.

No comments:

Post a Comment

^ Scroll to Top