configuring Windows services  
Author Message
V4Venkat





PostPosted: Visual C# General, configuring Windows services Top

I have created a background windows service, i am able to configure the "user-name" and "password", but i am not able to configure the recovery actions, i.e., first failure.. second failure..

can any one guide me to configure that programicaticaly or does any one have a sample code to acheive that.

thanks,

venkat.



Visual C#12  
 
 
Sven De Bont





PostPosted: Visual C# General, configuring Windows services Top

Take a look at the following code on thecodeproject

http://www.codeproject.com/csharp/sercviceinstallerext.asp

It shows you how to create an installer class that modifies the recovery actions on installation of the service. You could easily extract the code to use in your own project.

Hope this helps

Sven



 
 
Seradex





PostPosted: Visual C# General, configuring Windows services Top

Is there no way to set these recovery options using Framework 2.0 (or 3.0)