Wednesday, November 10, 2010

How to Start or Stop a Windows Service with Help of Batch Files


Some users ask us how can they start Windows service with help of a batch script. That's why we decided to write a short post on this topic in our team's blog.
First of all it should be mentioned that starting or stopping some Windows services can make your system work strangely. Thus you should work with services really carefully, especially with standard services installed while the installation of the operating system.
Actually, you should know only one command to run or end Windows services. This command is called NET. To run a service you should add to your batch file the following line:
NET START "Service Name"
And to stop a service you have to use this construction:
NET STOP "Service Name"
Of course, you have to use the real name of the service you want to start or stop instead of Service Name.
It's really easy to work with services, as you see. If you have any questions about batch files, feel free to ask us via support@m-w-c-s.com.

No comments:

Post a Comment

Translate