Over a million developers have joined DZone.

Installed Windows Services in C#

DZone's Guide to

Installed Windows Services in C#

· ·
Free Resource

The following code checks whether a Windows service is installed on your machine or not:

public static void ISWindowsServiceInstalled(string serviceName)
    // get list of Windows services
    ServiceController[] services = ServiceController.GetServices();
    foreach (ServiceController service in services)
        if (service.ServiceName == serviceName)
            return true;
    return false;



Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}