I thought of that but I don't see how I can create a bootstrapper that allows 
the user to select which "feature" to install 
Being 1. The Server install 2. The Client install...

Steve
Btw I will try to "move" the service creation to a 
ServiceInstall/ServiceConfig/ServiceControl elements.

-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] 
Sent: September-27-12 10:43 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] shared services question...

First off, I avoid merge modules and wix libs like the plague. I think I would 
go for an alternate implementation where I would have 3 MSI's, isolating the 
service into its own independent package and utilize burn to wrap the 
prerequisites and the two MSI's in question together.

>From what I see, your EXE CA which Starts/Stops also appears to 
>Install/Uninstall at the same time. 

Installing both MSI and then removing one:
  The easy way to fix this would be to use the ServiceInstall element so that 
it should only be installed or removed based on the component state. Is there a 
reason you chose to write a custom service install routine instead of using the 
existing infrastructure? You might find more information here 
(http://www.joyofsetup.com/2008/04/09/feature-states-in-component-conditions/). 
 What I think you would be looking for is a component state condition that 
would block the calling of the uninstall if the component state wasn't set to 
remove.

Major Upgrade issue:
  You will probably need to detect that an upgrade is happening and skip the CA 
in that case. Depending on where you have RemoveExistingProducts scheduled, you 
might have to add AND (NOT UPGRADINGPRODUCTCODE) to the Stop/Remove portion (to 
support an upgrade of the same product).



-----Original Message-----
From: Steven Ogilvie [mailto:steven.ogil...@titus.com]
Sent: Wednesday, September 26, 2012 1:24 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] shared services question...

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="&quot;[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseAuditLogService\NServiceBus.Host.exe&quot;
 /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="&quot;[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseManagementService\NServiceBus.Host.exe&quot;
 /install NServiceBus.Production /serviceName:&quot;Titus Enterprise 
Management&quot; /displayName:&quot;Titus Enterprise Management Service&quot; 
/Description:&quot;This is the Titus Enterprise Management Service&quot; 
/username:&quot;NT Authority\LocalSystem&quot; 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="&quot;[$(var.PlatformProgramFilesFolder)]TITUS\Gloria\Services\EnterpriseManagementService\NServiceBus.Host.exe&quot;
 /uninstall /serviceName:&quot;Titus Enterprise Management&quot;" 
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

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics Download AppDynamics Lite for free 
today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to