gpt4 book ai didi

service - Wix:可以在InstallValidate之前执行自定义操作吗?

转载 作者:行者123 更新时间:2023-12-02 11:22:44 26 4
gpt4 key购买 nike

在卸载过程中,安装程序会显示以下消息:

"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."

我认为这是由于卸载时已安装的服务仍在运行所致。因此,我尝试编写一个自定义操作来阻止它。但是,好像不行。

如果我将操作设置为 Execute='deferred' Impersonate='no',它只允许我在 InstallInitializeInstallFinalize 之间放置操作code>,所以我必须将其设置为“立即”。

<CustomAction BinaryKey='CustomActions' Id='StopService' DllEntry='StopService' Execute='immediate' />

<Custom Action="StopService" Before="InstallValidate">REMOVE="ALL"</Custom>

另请注意,由于某些原因,我必须使用自定义操作来手动安装服务,而不是使用 Wix。这就是为什么我尝试手动删除它。

最佳答案

您无法在 InstallInitialize 之前运行提升的自定义操作。如果您正常安装该服务,MSI 将负责为您停止该服务,并且不会显示正在使用的消息。

关于service - Wix:可以在InstallValidate之前执行自定义操作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7362935/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com