Hi everone!

The story behind my question is rather long, so I'll ask the question up
front and if you need more context you can just keep reading...

Apparently, any non-standard properties referenced in an MSM are
localized to the MSM.  e.g. [MYPROPERTY] becomes something like
[MYPROPERTY.CF54946D_A3E5_4931_92E0_4E80400C563F].

How do you use a non-standard global property in an MSM?


Here's some background...

We're in a situation where multiple development teams will be producing
various components of a larger product.  We want these teams to produce
MSMs which will then be merged into an MSI for final delivery to
production.  Before delivery, the product MSI will be transformed such
that multiple instances of the MSI can be installed side-by-side.

To support side-by-side installation, a number of resources need to be
defined such that they're named differently for each instance.  For
example, if we need an instance of a Windows Service for each
installation of the MSI, the name of the service has to be changed for
each installation.

Our intent is to provide a number of properties in the MSI for the
modules to reference, including [PRODUCTINSTANCENAME] that will be set
as part of the transform.  So, for a customer named "Fred",
[PRODUCTINSTANCENAME] may be set to "Fred's Emporium", but for customer
"George", [PRODUCTINSTANCENAME] could be "George's Jungle".

So, a <ServiceInstall> may look like this...

<ServiceInstall Id="SpecialService"
                DisplayName="Special Service For [PRODUCTINSTANCENAME]"
                Description="Some Super Special Service For
[PRODUCTINSTANCENAME]"
                Arguments="--service"
                Name="[PRODUCTINSTANCENAME]SpecialService"
                ErrorControl='normal'
                Start='auto'
                Type='ownProcess'
                Vital='yes' />

This way, someone producing an MSM doesn't need to know anything about
the customer's instance.

But this doesn't quite work the way we were hoping.

The resulting row in the MSM's ServiceInstall table looks like this...
   SpecialService.CF54946D_A3E5_4931_92E0_4E80400C563F
 
[PRODUCTINSTANCENAME.CF54946D_A3E5_4931_92E0_4E80400C563F]SpecialService
   Special Service For
[PRODUCTINSTANCENAME.CF54946D_A3E5_4931_92E0_4E80400C563F]
   16
   2
   32769
   --service
   SomeSpecialService.CF54946D_A3E5_4931_92E0_4E80400C563F
   Some Super Special Service For [PRODUCTINSTANCENAME]

The problem here is the [PRODUCTINSTANCENAME] property has been
localized to the MSM, when what we really want is for it to use a
property that will be defined later through a transform.  Also, it
hasn't been localized consistently; the Description column has not had
the package GUID applied.

So, not to be deterred, we did some poking around.  It turns out if we
pre-declare the property like this...

  <Property Id="PRODUCTINSTANCENAME" SuppressModularization="yes" />

...we get the behavior we want (no GUIDs on the property references),
but end up with some ugly warnings in the build:

Warning CNDL1006: Property 'PRODUCTINSTANCENAME' does not contain a
Value attribute and is not marked as Admin, Secure, or Hidden.  The
Property element is being ignored.
Warning CNDL1086: The Property/@SuppressModularization attribute has
been set to 'yes'.  Using this functionality is strongly discouraged; it
should only be necessary as a workaround of last resort in rare
scenarios.


These warning make us nervous.  Is there a better way to define/use
non-standard global properties?

Thanks,
Kurt Jacobson
CSG Systems, Inc.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to