【发布时间】:2013-12-17 17:17:26
【问题描述】:
大家,我正在使用 Wix 制作安装程序来运行服务,以下是我的问题:
我使用自定义操作调用 sc.exe 来安装和启动服务,然后我使用自定义操作调用 sc.exe [停止/删除] 以在卸载时删除服务。这工作正常,除了一个消息框说
"The setup must update files or services that cannot be updated while the system is running, if you choose to continue, a reboot will be required to complete the setup"
但实际上我点击“确定”后,并没有重启,服务也卸载成功了,请问如何去掉这个提示框呢?
还有一个问题是,点击消息框的“确定”后,又弹出一个消息框,告诉我“另一个程序对文件[fileA]有独占访问权,请点击重试”,我点击重试后,卸载成功完成。 [fileA] 已被删除,但留下了另一个文件 [fildB]。
但我确实使用了一个组件:
<Component
<RemoveFile ..
<RemoveFile ...
</Component>
删除这些文件。我有
<Custom Action="StopService" Before="RemoveFiles">..
<Custom Action="RemoveService" After="StopService>..
在我的 wix 中。 有人有什么建议吗?
【问题讨论】:
标签: service wix installation