首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >即使我声明3,Wix也只注册了一项服务

即使我声明3,Wix也只注册了一项服务
EN

Stack Overflow用户
提问于 2014-09-18 22:58:10
回答 1查看 35关注 0票数 1

我的.wxs文件有一个这样的片段

代码语言:javascript
复制
<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将被注册。

知道怎么会发生这种事吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-09-25 00:20:00

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25923769

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档