2012-04-27 95 views
0

我通过msi包(WIX)在机器上安装了我的服务。但是,当主要升级完成后,服务会被卸载,但它不会被安装。重要升级中未安装Windows服务-WIX

这是我的代码:

<Component Id="abc" Guid="{E64A8CDD-816F-4544-9ACD-A2E367F7758A}"> 
       <File Id="EventTraceService.exe" Source="..\..\..\..\Products\abc.exe" Vital="yes" KeyPath ="yes"/> 
       <File Source="..\..\..\..\Products\abc.exe.config" Vital="yes" /> 
       <ServiceInstall 
       Id="ServiceInstaller" 
       Type="ownProcess" 
       Vital="yes" 
       Name="abc" 
       DisplayName="abc" 
       Description="Monitoring and management of Trace" 
       Start="auto" 
       Account="LocalSystem" 
       Interactive="yes" 
       ErrorControl="normal" 
        /> 
<ServiceControl Id="StartService" Start="install" Stop="uninstall" Remove="uninstall" Name="abc" Wait="yes" /> 

在此先感谢!

+0

它提供了一个错误,或者它只是不安装? – BryanJ 2012-04-27 15:57:29

回答

2

一个可能的解释是您更改了组件的GUID。因此,相同资源(的不同版本)由不同组件管理。

从Windows安装文件约what happens when the component rules are broken

作家包括两个不同的组件相同的资源。

如果两个组件的资源名称和位置都相同,并且这两个组件都安装在同一个文件夹中,那么删除任一组件都会删除公共资源,从而损坏剩余的组件。

  • 卸载任一组件会删除资源并中断其他组件。
  • 零件参考计数机构损坏。

这似乎符合您的症状。

+0

非常感谢您的回答! – user998520 2012-05-10 07:20:16