Controlling a Windows Service

Create and manipulate a Windows service.

In the previous section, I discussed several utilities for manipulating Windows services. You may also need to manipulate a Windows service programmatically from your program. You may use this in the scenario where you want to take some action based on the status of a service or you may want to take some actions in a program that require you to start, pause, continue, or stop a Windows service. You may also want to programmatically manipulate a Windows service when you want to provide your own custom user interface for configuring and controlling a Windows service.

NOTE

Creating MMC Snap-ins If you wish to provide an MMC-integrated administration module for your Windows service ...

Get MCAD/MCSD Training Guide (70-320): Developing XML Web Services and Server Components with Visual C#™ .NET and the Microsoft .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.