我是WiX的新手,并且正在尝试创建一个安装包含3个Windows服务的应用程序的安装程序。其中一个服务在虚拟中提供了一个用于调试其他两个服务的钩子。我可以使用InstallUtil成功安装服务,但需要包含其他组件和应用程序的更完整的安装。使用WiX来安装具有多个Windows服务的进程
在WXS文件中,组件中有三个ServiceInstall节点和三个ServiceControl节点。这些节点引用应用程序可执行文件中定义的三个服务的名称。
运行安装程序成功完成,报告的服务已安装并启动。但是,第二个和第三个服务的功能不可用,并且检查事件日志会显示输入3次虚拟服务的启动消息。类似的,当停止所有3个服务 - 虚拟关机消息出现3次。看起来WSX文件中的服务声明实际上安装了服务之间存在一些故障。
从与该组件的WSX文件的XML如下:
<Component Id="LPMMANAGEMENTSERVICE.EXE"
Guid="36C773C5-EF30-4D8D-B9CC-015EBE906CCB" DiskId="1">
<File Id="LPMMANAGEMENTSERVICE.EXE" Name="LPMManagementService.exe" Source="Projects\LumePress\LumeJetManagement\LPMManagementService\bin\Release\LPMManagementService.exe" />
<ServiceInstall Name="LPMManagementDebug" Type="ownProcess" Start="auto"
ErrorControl="critical" Interactive="no" Account="LocalSystem"
Vital="yes" DisplayName="LPM Management Service Debugger"
Description="This service provides a process startup without starting the key services, allowing a debugger to attached and handle onstart and onstop"
Id="LPM_Management_Service_Debugger_Installer" />
<ServiceInstall Name="LPMServiceListeners" Type="ownProcess" Start="auto"
ErrorControl="critical" Account="LocalSystem" DisplayName="LPM Management Service Listeners"
Id="LPM_MANAGEMENT_SERVICE_LISTENERS_INSTALL" Interactive="no" Vital="yes"
Description="Provides WebAPI and WCF Services for the LPM Architecture" />
<ServiceInstall Name="LPMMonitoring" Type="ownProcess" Start="auto" ErrorControl="critical"
Description="Manages and logs events from the LPM Core perl executable"
DisplayName="LPM Management Service LPM Core and Monitoring" Account="LocalSystem"
Id="LPM_MANAGEMENT_SERVICE_CORE_INSTALL" Interactive="no" Vital="yes">
<ServiceDependency Id="LPMServiceListeners" />
</ServiceInstall>
<ServiceControl Id="LPM_MANAGEMENT_DEBUG_CONTROL" Name="LPMManagementDebug"
Remove="uninstall" Start="install" Stop="both" />
<ServiceControl Id="LPM_MANAGEMENT_SERVICE_LISTENERS_CONTROL" Name="LPMServiceListeners"
Remove="uninstall" Start="install" Stop="both" />
<ServiceControl Id="LPM_MANAGEMENT_SERVICE_CORE_CONTROL" Name="LPMMonitoring"
Remove="uninstall" Start="install" Stop="both" />
</Component>
我发现,涉及到创建多个服务的各种问题,但我找不到任何问题,直接关系到这个场景或类似的足以推断我做错了什么。
希望有人会有一个可能有所帮助的建议。
如果我错过了某些明显的东西,很乐意提供更多信息。
我想你应该有一个组件和每个ServiceControl的文件,但你有三个同一个文件的ServiceControl。您是否尝试为每个服务创建一个组件和文件,并为这些组件中的每一个分配一个ServiceControl? –
您是否找到解决方案@ChandyHendrix? – Farinha