我有一个服务需要30-60秒才能停止。当我运行安装程序并将服务升级到新版本时,我总是会看到以下窗口(在继续安装之前,我会验证服务是否已停止。

有没有办法在安装程序中设置此超时时间,以便应用程序有足够的时间为最终用户可能安装的任何更新停止服务?我们的安装程序是使用WiX 3.5构建的。
发布于 2013-04-05 21:28:33
不幸的是,等待在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 (就像每个自定义操作一样),所以我会尽最大努力修复服务。
https://stackoverflow.com/questions/15834774
复制相似问题