2013-04-05 80 views
0

我有一项服务需要30-60秒之间的时间才能停止。当我运行安装程序,提升服务的新版本,我总是得到下面的窗口(我验证服务之前,继续安装停止。设置关闭WiX服务的超时时间

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.

有没有一种方法来设置这种超时在安装程序,以便应用程序有足够的时间来停止服务的任何更新最终用户可以安装?我们的安装程序是使用WiX 3.5构建的

回答

3

不幸的是,等待不能在Windows安装程序中配置从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. 

您需要让服务更快地关闭(对于最终用户来说也是很棒的);或者必须编写自定义操作来自行关闭。这将是一大块工作,并添加更多fragility to the install(因为每个自定义动作都会),所以我会尽可能地努力修复该服务。

+0

是的,我害怕我必须这样做。我希望能够快速“将此超时设置得更高”解决方案,但要做的正确的事情就是解决无法及时关闭服务的任何问题 – 2013-04-05 13:40:57

+1

@RobMensching - MSI SDK Doco过分简化了这种关系。有一个注册表值(ServicesPipeTimeOut),它在设置时将30秒增加到所需的毫秒数。我个人是为了让服务停止并且更快启动,而不是在安装时插入系统设置,但我看到微软产品(例如TFS将其设置为60秒)修改它。 – 2013-04-05 14:42:22

+1

我最终优化了我们如何关闭服务器,所以现在只需要几秒钟而不是一分钟。优化AMIRITE的地狱?哈哈 – 2013-04-12 12:47:13