Skip to content

firespeed79/winsvc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winsvc

A thin wrapper around the Windows service functions.

Extracted from the next version of Print Distributor.

Although .Net has some service control facilities I kept coming across gaps and complicating abstractions hence this project.

Note this project does not and will not allow you to create a service, only control and manage services.

Starting a service is as easy as:

    using (var scm = ServiceControlManager.OpenServiceControlManager(null, SCM_ACCESS.SC_MANAGER_ALL_ACCESS))
    using (var service = scm.OpenService("Your Service Name", SERVICE_ACCESS.SERVICE_ALL_ACCESS))
    {
        service.Start();
    }

About

A thin wrapper around the Windows service functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 93.6%
  • PowerShell 6.4%