2013-04-16 31 views
0

我正在安裝多個.net Windows服務。所有服務都將所有依賴項安裝在適當的文件夾中。但是,只有第一個會運行。其他服務提供錯誤1053:該服務未及時啓動響應或控制請求。使用Wix 3.7安裝多個.Net服務只有第一個運行

想法?

編輯:這不需要30秒。它發生在大約1秒鐘內。

編輯:

<ComponentGroup Id="IngestServiceComponents" Directory="IngestINSTALLFOLDER"> 
    <Component Id="IngestService" Guid="5a95ee28-c9da-46b9-8396-cef98fa8fcbb"> 
    <File Id="IssueIngestService.exe" Name="IngestService.exe" Source="..\IngestService\bin\Release\IngestService.exe" Vital="yes" KeyPath="yes" DiskId="1"/> 
    <File Id="IngestService.exe.config" Name="IngestService.exe.config" Source="..\IngestService\bin\Release\IngestService.exe.config" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="Libraries2_1" Name="Libraries2.dll" Source="..\IngestService\bin\Release\Libraries2.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="DLibraries2_1" Name="DLibraries2.dll" Source="..\IngestService\bin\Release\DLibraries2.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="ICSharpCode.SharpZipLib_1" Name="ICSharpCode.SharpZipLib.dll" Source="..\..\Assemblies\ICSharpCode.SharpZipLib.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="ChilkatDotNet45_1" Name="ChilkatDotNet45.dll" Source="..\..\Assemblies\ChilkatDotNet45.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="MediaInfo_1" Name="MediaInfo.dll" Source="..\..\Assemblies\MediaInfo.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="XmpToolkit_1" Name="XmpToolkit.dll" Source="..\..\Assemblies\XmpToolkit.dll" Vital="yes" KeyPath="no" DiskId="1"/> 
    <File Id="ffmpeg.exe_1" Name="ffmpeg.exe" Source="..\..\Assemblies\ffmpeg.exe" Vital="yes" KeyPath="no" DiskId="1"/> 
    <ServiceInstall 
       Id="IngestServiceInstaller" 
       Type="ownProcess" 
       Vital="yes" 
       Name="IngestService" 
       DisplayName="Ingest" 
       Description="Ingest Service" 
       Start="auto" 
     Account="user" 
     Password="password" 
       ErrorControl="ignore" 
       Interactive="no"> 
    </ServiceInstall> 
    <ServiceControl Id="IngestStartService" Stop="both" Remove="uninstall" Name="IngestService" Wait="no" /> 
    </Component> 
</ComponentGroup> 
+1

在這裏不是很多。你能分享你用來安裝的.wxs代碼嗎?另外,您是否驗證錯誤對話框啓動後服務可以啓動?基本上需要更多的信息。 –

+0

添加了Wix代碼片段。我有4個相同的塊。序列中的第一個作品。以下3個不啓動。 – Demetri

回答

0

所以問題是用戶錯誤照常。第一個服務是.net Framework 4.0。所有新的都是4.5。未安裝Framework 4.5。

0

鑑於上面的例子中,我將不得不猜測的東西是在你安裝服務歪去。你有ServiceControl/@Wait='no',這意味着4個服務幾乎可以同時啓動。他們是否有可能相互碰撞,只有一個人在開始時倖存下來?

您可能會考慮使用ServiceControl/@Wait='yes'並調試服務。出現錯誤對話框時,您應該能夠看到並啓動服務(通過命令行中的services.mscsc.exe)。保留錯誤對話框並進行調試以查看可能出錯的內容。

你的設置代碼沒有任何明顯的錯誤。 PS:將很多文件,尤其是其他可執行文件放在一個單獨的Component中不是最佳實踐。請參閱Component Rules爲什麼。

+0

因此,使用當前的wxs代碼,所有服務都可以正確安裝。我也不會自動啓動服務。如果碰撞是問題,我將能夠從services.msc啓動它們。唯一啓動的是第一個。不知道這是否有幫助。 – Demetri