Kamis, 05 Agustus 2010

How to start or stop a Windows Service using C#

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

Tidak ada komentar:

Posting Komentar