Service Wix3能否检查服务是否存在?

Service Wix3能否检查服务是否存在?,service,installation,wix,wix3,Service,Installation,Wix,Wix3,WIX3是否有一种内置的方法来检查服务是否存在?我能想到的最接近的猜测是使用ServiceConfig并尝试检测故障。AppSecInc。社区MSI扩展具有服务自定义操作。 在线文档: 未安装 未安装 如果服务存在,则将服务设置为“1”,否则设置为“0”。您可以检查注册表项。我也可以这样做。我只是想知道是否有检查服务的内置支持。是的,我不知道。希望有。但是检查注册表项比检查ServiceConfig更容易。:)你说得对。我想这就是我要做的。 <Binary Id="SystemTo

WIX3是否有一种内置的方法来检查服务是否存在?我能想到的最接近的猜测是使用ServiceConfig并尝试检测故障。

AppSecInc。社区MSI扩展具有服务自定义操作。

在线文档:


未安装
未安装

如果服务存在,则将服务设置为“1”,否则设置为“0”。

您可以检查注册表项。我也可以这样做。我只是想知道是否有检查服务的内置支持。是的,我不知道。希望有。但是检查注册表项比检查ServiceConfig更容易。:)你说得对。我想这就是我要做的。
<Binary Id="SystemTools" SourceFile="$(var.BinDir)\SystemTools.dll" />

<CustomAction Id="SetServiceName" Property="SERVICE_NAME" Value="Service1" />
<CustomAction Id="ServiceExists" BinaryKey="SystemTools" DllEntry="Service_Exists" Execute="immediate" Return="check" />

<InstallExecuteSequence>
     <Custom Action="SetServiceName" After="InstallFiles">NOT Installed</Custom>
     <Custom Action="ServiceExists" After="SetServiceName">NOT Installed</Custom>
</InstallExecuteSequence>