You want to start or stop a Windows service that is installed on the current computer.
Use the Stop and Start methods of the ServiceController class.
Recipe Retrieve Information About Installed Windows Services shows the properties of the ServiceController class. The ServiceController class also provides methods such as Start, Stop, Pause, and Continue.
As an example, here’s how you might start a service programmatically:
Dim TestService As New ServiceController("TestService") TestService.Start()
The ServiceController class methods allow you to start and stop services and monitor their status, but they won’t allow you to interact in an application-specific way. In other words, ...