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

发布于 2024-10-10 08:30:12 字数 292 浏览 0 评论 0原文

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

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

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

I need the service to stop and be removed on its uninstall, but I don't want it to start on install. The problem is, the start attribute on the ServiceControl element does not provide an option to disable starting. Or am I just missing it?

I'm using this for my service control element:

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

落叶缤纷 2024-10-17 08:30:12

根据文档start 属性是可选的,因此只需完全省略它即可。

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

As per the documentation, the start attribute is optional, so simply omit it entirely.

 <ServiceControl Id="StartService"
    Stop="both"
    Remove="uninstall"
    Name="Remec.AteService"
    Wait="yes" />
浅浅 2024-10-17 08:30:12

省略 Start 属性。

Leave out the Start attribute.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文