WiX ServiceControl在卸载时停止服务,但不要在安装时启动它 [英] WiX ServiceControl Stop a service on uninstall, but don't start it on install

查看:100
本文介绍了WiX ServiceControl在卸载时停止服务,但不要在安装时启动它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

推荐答案

按照

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

这篇关于WiX ServiceControl在卸载时停止服务,但不要在安装时启动它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆