2014-09-18 54 views
1

我.wxs文件有一块这样的维克斯只注册一个服务,即使我宣布3

<Directory Id="UDPMonitorFiles" Name="UDP Monitor"> 
    <Component Id="UDPMonitorFiles" Guid="*"> 
    <File Id="UDP_UDPMonitor.exe" 
      Source="$(var.UDP Monitor.TargetDir)\UDP Monitor.exe"/> 
    <File Id="UDP_UDPMonitor.exe.config" 
      Source="$(var.UDP Monitor.TargetDir)\UDP Monitor.exe.config"/> 
    <ServiceInstall 
     Id="UDPServiceInstaller" 
     Type="ownProcess" 
     Vital="yes" 
     Name="DiskManagement" 
     DisplayName="Epicentral UDP Monitor" 
     Description="Epicentral UPD Printer Monitoring Service" 
     Start="demand" 
     Account="LocalSystem" 
     ErrorControl="ignore" 
     Interactive="no"> 
    </ServiceInstall> 
    </Component> 
</Directory> 
<Directory Id="S2SCallerServiceFiles" Name="S2S Caller Service"> 
    <Component Id="S2SCallerServiceFiles" Guid="*"> 
    <File Id="S2SCallerService.exe" 
     Source="$(var.S2SCallerService.TargetDir)\S2SCallerService.exe"/> 
    <File Id="S2SCallerService.exe.config" 
     Source="$(var.S2SCallerService.TargetDir)\S2SCallerService.exe.config"/> 
    <File Id="S2S.xml" 
     Source="$(var.S2SCallerService.TargetDir)\S2S.xml"/> 
    <File Id="S2S_log4net.dll" 
     Source="$(var.S2SCallerService.TargetDir)\log4net.dll"/> 
    <ServiceInstall 
     Id="S2SCallerServiceInstaller" 
     Type="ownProcess" 
     Vital="yes" 
     Name="DiskManagement" 
     DisplayName="Epicentral S2S Caller Service" 
     Description="Epicentral S2S Caller Service" 
     Start="demand" 
     Account="LocalSystem" 
     ErrorControl="ignore" 
     Interactive="no"> 
    </ServiceInstall> 
    </Component> 
</Directory>       
<Directory Id="HealthWatcherServiceFiles" Name="Health Watcher Service"> 
    <Component Id="HealthWatcherServiceFiles" Guid="*"> 
    <File Id="HealthWatcherService.exe" 
     Source="$(var.HealthWatcherService.TargetDir)\HealthWatcherService.exe"/> 
    <File Id="HealthWatcherService.exe.config" 
     Source="$(var.HealthWatcherService.TargetDir)\HealthWatcherService.exe.config"/> 
    <ServiceInstall 
     Id="HealthWatcherServiceInstaller" 
     Type="ownProcess" 
     Vital="yes" 
     Name="DiskManagement" 
     DisplayName="Epicentral Health Watcher Service" 
     Description="Epicentral Health Watcher Service" 
     Start="demand" 
     Account="LocalSystem" 
     ErrorControl="ignore" 
     Interactive="no"> 
    </ServiceInstall> 
    </Component> 
</Directory> 

,不知怎的,只注册一个服务,即使有3个项目,用自己的条目。如果我注释掉安装的(HealthWatcherServiceInstaller),则S2SCallerServiceInstaller会被注册。

任何想法如何发生?

回答

1

ServiceInstall/@ Name属性是服务的名称。您已将所有服务设置为具有相同的名称。您需要为每个服务指定不同的名称。