Home

Vici WinService

Project coordinators

  • Philippe Leybaert

Contributors

  • you?

Vici WinService is a lightweight .NET library for creating Windows services.

Features:

  • Create self-installing and self-uninstalling applications (no need for installutil)
  • Run your application as a service or a console application
  • Easily debug applications from Visual Studio
  • Create tasks (sub-services) that run multi-threaded or synchronised

With Vici WinService, you can now create a multithreaded windows service with just a few lines of code:

class MyService : Service
{
    public MyServiceService() : base(new ServiceInfo("MyService"))
    {
        ServiceTasks.Add(new MyServiceTask());
    }
}

class MyServiceTask : CyclicServiceTask
{
    public MyServiceTask() : base(TimeSpan.FromSeconds(30), false) {}
    
    protected override void RunTask()
    {
        // Do your stuff here
    }
}

static class Program
{
    static void Main()
    {
        new MyService().Run();
    }
}