本文介绍了wix 服务依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的产品具有多项功能,包括两项服务.我们称它们为 ServiceA 和 ServiceB.这两项服务功能都是可选的.但是,如果在安装过程中同时选择了 ServiceA 和 ServiceB,我想在它们之间创建一个服务依赖项,以便 ServiceB 将依赖于 ServiceA(换句话说,ServiceB 必须始终在 ServiceA 启动之前启动).

My product has several features including two services. Let's call them ServiceA and ServiceB. Both of these service features are optional. However if both ServiceA and ServiceB is selected during install I want to create a service dependency between them so that ServiceB will depend on ServiceA (in other words ServiceB must always start before ServiceA is launched).

如何在 WIX 3.6 中实现这一点?

How do I achieve this in WIX 3.6?

推荐答案

<ServiceInstall Id="ServiceA" DisplayName="ServiceA" Name="ServiceA"
    Account="LocalSystem" Start="auto" ErrorControl="normal" Type="ownProcess">
    <ServiceDependency Id="ServiceB"/>
</ServiceInstall>

应该可以,请查看 ServiceDependency 文档元素

这篇关于wix 服务依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-01 13:25