I'm trying to modify an existing wxs file in order to configure a service. I want this service to be configure for restarting when it stops. This service is installed by my msi.
I use a util:ServiceConfig, nested under ServiceInstall. I set First/Second/ThirdActionFailure to "restart". This work fine except on Windows Seven and Windows Server 2008 R2.
I have look on internet, and found that I should use a ServiceConfigFailureActions Element, and maybe a ServiceConfig (not sure of this one).
I tried to use both of them, but nothing changes. The service is installed, no problems, but not configured for restarting on failures.
Here is the code corresponding to the ServiceConfigFailureActions Element.
<ServiceConfigFailureActions Id="ServiceRestarter" OnInstall="yes" OnReinstall="yes" OnUninstall="no" ResetPeriod="0">
<Failure Action="1" Delay="0" />
</ServiceConfigFailureActions>
I tried to set three failures under ServiceConfigFailure Actions, I tried to nest it under ServiceInstall or not, but nothing changes.
Has someone an idea that can help me ?
Thank you for reading.