wix服务依赖项

Dan*_*iel 5 wix wix3 wix3.6

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

我如何在WIX 3.6中实现这一目标?

Nat*_*arr 7

<ServiceInstall Id="ServiceA" DisplayName="ServiceA" Name="ServiceA" 
    Account="LocalSystem" Start="auto" ErrorControl="normal" Type="ownProcess">
    <ServiceDependency Id="ServiceB"/>
</ServiceInstall>
Run Code Online (Sandbox Code Playgroud)

这应该工作,请查看ServiceDependency文档元素