Skip to content

Toolkit that provides convenient methods for .NET application to easily integrate background windows services

License

Notifications You must be signed in to change notification settings

cschen1205/cs-windows-service-toolkit

Repository files navigation

cs-windows-service-toolkit

Toolkit that provides convenient methods for .NET application to easily integrate background windows services

Install

Install-Package cs-windows-service-toolkit

Usage

The sample code shows how to use this lib:

namespace WindowsServiceToolkit
{
    class Program
    {
        static void Main(string[] args)
        {
            string serviceName = "notepad";
            int timeoutMilliseconds = 1000;
            WinServiceUtil.StartService(serviceName, timeoutMilliseconds);
            WinServiceUtil.IsServiceInstalled(serviceName);
            WinServiceUtil.StopService(serviceName, timeoutMilliseconds);
            WinServiceUtil.RestartService(serviceName, timeoutMilliseconds);
        }
    }
}

About

Toolkit that provides convenient methods for .NET application to easily integrate background windows services

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages