Question

I have a service that takes between 30-60 secs to stop. When I run the installer and upgrade the service to a new version, I always get the following window (which I verify that the service is stopped prior to continuing the installation.

Screenshot of error: The setup was unable to automatically close all requested applications. Please ensure that the applications holding file in use are closed before continuing with the installation.

Is there a way to set this timeout in the installer so that the application has enough time to stop the service for any updates the end user may install? Our installer is built with WiX 3.5.

Was it helpful?

Solution

Unfortunately the wait is not configurable in the Windows Installer. From their documentation:

Wait 

Leaving this field null or entering a value of 1 causes the installer to 
wait a maximum of 30 seconds for the service to complete before proceeding.

The wait can be used to allow additional time for a critical event to return
a failure error. A value of 0 in this field means to wait only until the
service control manager (SCM) reports that this service is in a pending state
before continuing with the installation.

You'll need to either get your service to shutdown faster (would be great for the end user too ;) or have to write a custom action to do the shutdown yourself. That will be a chunk of work and add more fragility to the install (as every custom action does) so I'd try as hard as possible to fix the service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top