I have a separate merge module that creates the "infrastructure" of NServiceBus host I have a custom action that runs NServiceBus.Host.exe /installinfrastructure
Then the 4 service merge modules install files ONLY common to that service and custom actions that create/uninstall the service on install/uninstall (each service merge module does that) I then have 2 wixlibs that contain "shared" files between the 4 services WixLib 1: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include $(var.SolutionDir)\Includes\Variables.wxi ?> <Fragment> <ComponentGroup Id="cmpgrp_NServiceBus" Directory="WixLibRedirectFolder" > <!-- NServiceBus Assemblies --> <Component Id="cmp_NServiceBusAssembly" Guid="{088E18F8-EF0F-4626-9712-98277F2473D9}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_NServiceBusAssembly" KeyPath="yes" Name="NServiceBus.dll" Source="..\..\..\Source\ThirdParty\NServiceBus\3.2.8\binaries\NServiceBus.dll"/> </Component> <Component Id="cmp_NServiceBusHost" Guid="{B5CFDF82-7BF7-4655-8EE0-C72D82831B35}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_NServiceBusHost" KeyPath="yes" Name="NServiceBus.Host.exe" Source="..\..\..\Source\ThirdParty\NServiceBus\3.2.8\binaries\NServiceBus.Host.exe"/> </Component> <Component Id="cmp_NServiceBusCore" Guid="{9A5992DC-F21E-4BA7-A0C0-73E423014D65}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_NServiceBusCore" KeyPath="yes" Name="NServiceBus.Core.dll" Source="..\..\..\Source\ThirdParty\NServiceBus\3.2.8\binaries\NServiceBus.Core.dll"/> </Component> </ComponentGroup> </Fragment> </Wix> WixLib 2: same but different files... Merge Module for creating infrastructure: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include $(var.SolutionDir)\Includes\Variables.wxi ?> <Module Id="TitusServicesMergeModule" Language="1033" Version="1.0.0.0"> <Package Id="ca23a0dc-b2de-4f2c-9e74-fd373f99e9d7" Manufacturer="TITUS" InstallerVersion="200" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="MergeRedirectFolder"> </Directory> </Directory> <Property Id="$(var.PlatformProgramFilesFolder)" Secure="no" SuppressModularization="yes"/> <CustomAction Id="SetEALNBService" Property="EALNBService" Value=""[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseAuditLogService\NServiceBus.Host.exe" /installInfrastructure" Execute="immediate" /> <UI> <ProgressText Action="SetEALNBService">CA: Setting up SetEALNBService...</ProgressText> </UI> <CustomAction Id="EALNBService" Impersonate="no" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <UI> <ProgressText Action="EALNBService">CA: Creating NServiceBus infrastructure...</ProgressText> </UI> <InstallExecuteSequence> <Custom Action="SetEALNBService" After="CostInitialize">NOT Installed</Custom> <Custom Action="EALNBService" Before="InstallServices">NOT Installed</Custom> </InstallExecuteSequence> </Module> </Wix> A Service Merge Module: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <?include $(var.SolutionDir)\Includes\Variables.wxi ?> <Module Id="EnterpriseManagementServicesMM" Language="1033" Version="1.0.0.0"> <Package Id="D40E1FBB-05DF-4124-9CBB-3C09B6004B44" Manufacturer="TITUS" InstallerVersion="200" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="MergeRedirectFolder"> <Directory Id="WixLibRedirectFolder" Name="EnterpriseManagementService"> <Component Id="cmp_EnterpriseManagementDll" Guid="{CF645B61-7727-40BE-84F8-B6B6FC6B2160}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_EnterpriseManagementDll" KeyPath="yes" Name="Titus.Enterprise.Management.dll" Source="..\..\..\Source\EnterpriseServices\Titus.Enterprise.Management\bin\$(var.Configuration)\Titus.Enterprise.Management.dll" /> </Component> <Component Id="cmp_EnterpriseManagementConfig" Guid="{76DCFB0D-B7BD-4089-AD4D-945931CD73FD}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_EnterpriseManagementConfig" KeyPath="yes" Name="Titus.Enterprise.Management.dll.config" Source="..\..\..\Source\EnterpriseServices\Titus.Enterprise.Management\bin\$(var.Configuration)\Titus.Enterprise.Management.dll.config" /> <util:XmlFile Id="ModifyIsTitusServer" SelectionLanguage="XPath" File="[WixLibRedirectFolder]Titus.Enterprise.Management.dll.config" ElementPath="//applicationSettings/Titus.Enterprise.Management.Properties.Settings/setting[\[]@name='IsTitusServer'[\]]/value" Action="setValue" Value="true" Sequence="1" /> <ServiceControl Id="StartManagementService" Name="Titus Enterprise Management" Start="install" Stop="uninstall" Remove="uninstall" Wait="no"/> </Component> <!--shared for the meantime while tmc and admin figure out how to use same titus.domain.dll--> <Component Id="cmp_TitusDomainDll" Guid="{99A1236D-511B-4DB6-8265-449DAADAEAA7}" Permanent="no" SharedDllRefCount="yes" Shared="yes"> <File Id="file_TitusDomainDll" KeyPath="yes" Name="Titus.Domain.dll" Source="..\..\..\Source\Domain\bin\$(var.Configuration)\Titus.Domain.dll" /> </Component> <Directory Id="logfile" Name="logfile"> <Component Id="logfile" Guid="{A16E5D12-7B9B-47F4-92CC-C588ED1FFBCA}" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either"> <CreateFolder> <util:PermissionEx User="Everyone" GenericAll="yes" /> </CreateFolder> </Component> </Directory> </Directory> </Directory> </Directory> <!-- Shared services files --> <ComponentGroupRef Id="cmpgrp_NServiceBus" /> <ComponentGroupRef Id="cmpgrp_SharedServiceFiles" /> <Property Id="$(var.PlatformProgramFilesFolder)" Secure="no" SuppressModularization="yes"/> <CustomAction Id="SetStartEMService" Property="StartEMService" Value=""[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseManagementService\NServiceBus.Host.exe" /install NServiceBus.Production /serviceName:"Titus Enterprise Management" /displayName:"Titus Enterprise Management Service" /Description:"This is the Titus Enterprise Management Service" /username:"NT Authority\LocalSystem" Titus.Enterprise.Management.dll" Execute="immediate" /> <UI> <ProgressText Action="SetStartEMService">CA: Setting up SetStartEMService...</ProgressText> </UI> <CustomAction Id="StartEMService" Impersonate="no" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <UI> <ProgressText Action="StartEMService">CA: Starting Titus Enterprise Management Service...</ProgressText> </UI> <CustomAction Id="SetStopEMService" Property="StopEMService" Value=""[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseManagementService\NServiceBus.Host.exe" /uninstall /serviceName:"Titus Enterprise Management"" Execute="immediate" /> <UI> <ProgressText Action="SetStopEMService">CA: Setting up SetStopEMService...</ProgressText> </UI> <CustomAction Id="StopEMService" Impersonate="no" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <UI> <ProgressText Action="StopEMService">CA: Stopping Titus Enterprise Management Service...</ProgressText> </UI> <InstallExecuteSequence> <Custom Action="SetStartEMService" After="CostInitialize">NOT Installed</Custom> <Custom Action="StartEMService" Before="StartServices">NOT Installed</Custom> <Custom Action="SetStopEMService" After="CostInitialize">Installed</Custom> <Custom Action="StopEMService" Before="StopServices">Installed</Custom> </InstallExecuteSequence> </Module> </Wix> The other 3 are similar but do not start the service Steve -----Original Message----- From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] Sent: September-26-12 1:40 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] shared services question... Can you show the component containing the Service executable, along with the ServiceInstall element (and their relation)? Are they in the same component? When you said the creating and removing of the services in code, do you mean that you are using a custom action to do this instead of the existing Wix elements? -----Original Message----- From: StevenOgilvie [mailto:sogil...@msn.com] Sent: Wednesday, September 26, 2012 12:32 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] shared services question... The 4 services are each a separate merge module, with "common files" between them in two wixlibs The services creation/removal of services is code within the merge modules... (a side issue, a majority of the files do not get uninstalled either :( Steve -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/shared-services-question-tp7580859p7580862.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users