service - WiX ServiceControl在卸载时停止服务,但不要在安装时启动它

标签 service wix windows-installer installation uninstallation

我需要停止服务并在卸载时将其删除,但是我不希望它在安装时启动。问题是,ServiceControl元素上的start属性没有提供禁用启动的选项。还是我只是想念它?

我将此用于我的服务控制元素:

<ServiceControl Id="StartService"
    Start="install"
    Stop="both"
    Remove="uninstall"
    Name="Remec.AteService"
    Wait="yes" />

最佳答案

根据the documentationstart属性是可选的,因此只需将其完全忽略即可。

 <ServiceControl Id="StartService"
    Stop="both"
    Remove="uninstall"
    Name="Remec.AteService"
    Wait="yes" />

关于service - WiX ServiceControl在卸载时停止服务,但不要在安装时启动它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4590089/

相关文章:

c# - 如何使用 TopShelf 处理服务 session 更改

wix - 如何使用构建配置更改 .wxs 文件中的 url

java - 如何构建 systemd 可以直接作为服务执行的 Spring Boot jarfile?

java - 从服务中检索位置

java - Android 服务在 OPPO 小米 MIUI vivio 等某些设备上停止工作

wix - 如何调试WiX安装程序

仅使用 .Net Core 的 Wix MSI Bootstrapper

wix - 错误 LGHT0204 : ICE57: Component 'XXX' has both per-user data and a keypath that can be either per-user or per-machine

installation - 检查返回代码(或其他代码)以确保 MSI 已正确安装

c# - 为什么我的 Uninstall 方法没有从 msi 调用?