dasMulli / dotnet-win32-service

Helper classes to set up and run as windows services directly on .net core. A ServiceBase alternative.
MIT License
451 stars 57 forks source link

Can you add the possibility of install the service with Delayed Autostart? #25

Closed jersiovic closed 7 years ago

jersiovic commented 7 years ago

In the mean time I use sth like this through a powershell script http://metah.ch/blog/2012/09/how-to-change-a-service-startup-type-with-powershell/

dasMulli commented 7 years ago

Will keep that in mind, i already use ChangeServiceConfig2() for the description so a second call using SERVICE_CONFIG_DELAYED_AUTO_START_INFO as dwInfoLevel should do it. passing a pointer to a bool should be enough looking at the SERVICE_DELAYED_AUTO_START_INFO structure. (basically making notes to myself here..)