get status of windows service
Published: 26. January 2009 | Updated: 26. September 2011License: Microsoft Public License (MS-PL)
Categories: Windows » Services
Tags: C# Services Windows
Import namespace
using System.ServiceProcess;
Code
ServiceController service = new ServiceController("Eventlog"); Console.WriteLine(service.Status);
| Send us feedback about this snippet » |





