【发布时间】:2013-04-05 13:07:17
【问题描述】:
我有一项服务需要 30-60 秒才能停止。当我运行安装程序并将服务升级到新版本时,我总是看到以下窗口(我在继续安装之前验证服务已停止。
有没有办法在安装程序中设置此超时,以便应用程序有足够的时间停止服务以进行最终用户可能安装的任何更新?我们的安装程序是使用 WiX 3.5 构建的。
【问题讨论】:
标签: .net wix windows-installer wix3.5
我有一项服务需要 30-60 秒才能停止。当我运行安装程序并将服务升级到新版本时,我总是看到以下窗口(我在继续安装之前验证服务已停止。
有没有办法在安装程序中设置此超时,以便应用程序有足够的时间停止服务以进行最终用户可能安装的任何更新?我们的安装程序是使用 WiX 3.5 构建的。
【问题讨论】:
标签: .net wix windows-installer wix3.5
不幸的是,等待在 Windows Installer 中是不可配置的。来自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(就像每个自定义操作一样),所以我会尽可能努力修复服务。
【讨论】: