While that works perfectly, it wasn't what I was after, but interesting
nonetheless, so thanks.

In the end after a further day of head-scratching I realised that I didn't
fully understand what was going on in the merge process and was expecting
too much.  Revisting an example I realised that I needed a custom action to
set the property.  Here're the relevant bits:

MSM:

        <Property Id="FOO" Value="default"/>

        <Configuration Name='fooProperty' Format='Text'
DefaultValue='[FOO]'/>
        <Substitution Table='CustomAction' Row='setFoo' Column='Target'
Value='[=fooProperty]'/>
        <CustomAction Id='setFoo' Property='FOO' Value='[FOO]'/>

        <InstallExecuteSequence>
            <Custom Action='setFoo' Before="LaunchConditions">1</Custom>
        </InstallExecuteSequence>


MSI:

        <Property Id="FOO" Value="hello!"/>

        <Directory Id="TARGETDIR" Name="SourceDir">

            <Merge Id="MyMergeModule" SourceFile="MyMergeModule.msm"
DiskId="1" Language="1033" >
                <ConfigurationData Name='fooProperty' Value='[FOO]'/>
            </Merge>
        </Directory>


And that's it.  I was using FOO in the MSM to update an XML file to
demonstrate that it was being set to "hello!", which it was.

A nice end to the week :~)


Ryszard


On 12 August 2010 19:29, bpackard <bill.pack...@kepware.com> wrote:

>
> Not certain that this is exactly what you are looking for, if you are
> actually attempting to update the directory table (based on the
> MY_DIRECTORY
> property listed), then this may help.
>
>    <!-- This block replaces the parent directory (in the Directory table)
> of
>         SMHelp directory entry.
>         This allows the user defined Start Menu property to be used for the
>         shortcuts.
>    -->
>    <Configuration Name="SHORTCUTFOLDER" Format="Key" Type="Identifier"
> DefaultValue="SHORTCUTFOLDER"
>                   Description="Start Menu Path" DisplayName="Start Menu
> Folder"/>
>    <Substitution Table="Directory" Column="Directory_Parent" Row="SMHelp"
> Value="[=SHORTCUTFOLDER]"/>
>
> <Directory Id="TARGETDIR" Name="SourceDir">
>      <Directory Id="SMHelp" Name="Help Documentation" ShortName="HELPDOC"
> />
> ...
>
>
> The property SHORTCUTFOLDER is generated in the MSI and becomes the parent
> directory of the SMHelp directory that exists in the merge module.
>
> You'll also need an entry in the directory table of the MSI project for the
> SHORTCUTFOLDER directory, as the actual path is generated it doesn't really
> matter where in the hierarchy it is.
>    <Directory Id="SHORTCUTFOLDER" Name="ProgramMenuFolder"/>
>
>  When the module is merged into the MSI the parent of the SMHelp directory
> will become SHORTCUTFOLDER.
>
> bill packard
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Passing-properties-to-merge-modules-tp5417112p5417343.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to