We can start, stop, pause, continue and refresh a service using Start, Stop, Pause, Continue, and Refresh methods. Close method disconnects this ServiceController instance from the service and frees all the resources that the instance allocated.
The following code snippet checks if a service is stopped, start it; otherwise stop it.
Let's say, you have a service named "MyServiceName". First you create a ServiceController object and then call its Start or Stop methods to start and stop a windows service.
ServiceController service = new ServiceController("MyServiceName");
if ((service.Status.Equals(ServiceControllerStatus.Stopped)) ||
(service.Status.Equals(ServiceControllerStatus.StopPending)))
service.Start();
else
ServiceController class also have Pause, Continue, and Refresh methods to pause, continue, and refresh a windows service.

Suraj KumarPosted Sep 13, 2019, 8:02 AM
I want to make a service that runs on when i give a print to my printer and automatically store the data in database how can i do that
muhammed yasirPosted Jun 13, 2018, 6:46 AM
Butt InnerException = {"Access is denied"} how to solve
prem anandPosted Mar 19, 2013, 9:02 AM
Hi i had writen windows service to kill Excel in win server 2008 r2 and am calling start and stop in my asp.net appliction which is running DefaultAppPool User in IIS but i failed to start from .net app please help me
hyder yadwadPosted Sep 9, 2010, 1:41 AM
Very time I start the service it, performs the action and then stops automatically, How to make it run continiously.... Thnx Yadwad.