2012-04-27 69 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