Page 1 of 1

Windows: WinService

Posted: 20 Jul 2007, 15:01
by cdelmas
Is it possible to add the possibility to change the account used to launch a service (that is provide the two last arguments to CreateServiceW) ? This could be implemented adding optional parameters to registerService, along with a "setAccount" (or something equivalent) function (using ChangeServiceConfig) and "getAccount" to check the configuration. This would make this (very useful) class give more control to the programmer.

Thanks in advance.

Re: Windows: WinService

Posted: 20 Dec 2007, 18:49
by cdelmas
> Is it possible to add the possibility to change the account used to launch a service (that is provide the two last arguments to CreateServiceW) ? This could be implemented adding optional parameters to registerService, along with a "setAccount" (or something equivalent) function (using ChangeServiceConfig) and "getAccount" to check the configuration. This would make this (very useful) class give more control to the programmer.
>
> Thanks in advance.
>

In addition, is it possible to add a queryStatus function, returning an enum element ? (RUNNING, STOPPED, START_PENDING and so on)

Re: Windows: WinService

Posted: 09 Jun 2010, 18:26
by Jartson
I have created a windows service program with POCO and there is one feature in windows services that I would find useful POCO to implement. In windows service's properties you can change service's recovery options. You can define what you want to happen on first failure, second failure and subsequent failures. The options are take no action, restart service, run as program and restart the computer. It would be very useful if I could change these options inside the program with POCO.

Re: Windows: WinService

Posted: 24 Jun 2010, 09:10
by Jartson
start and stop service with timeout values.