Classification: Public For one thing you FOO property from your parent project is no longer FOO, in a merge module it takes on the merge module's GUID so your property is now FOO.<merge module GUID> as per your log: FOO.F5F26EB0_E10F_4C42_9337_E3138BE966BC
To fix that in your merge module add: <Property Id="FOO" SuppressModularization="yes"/> I am passing a property called CONFIGURATION via my MSI In my parent project (product.wxs) I have: <Property Id="CONFIGURATION" Secure="yes" Value="CONFIGURATION"/> In my merge module I have: <!-- Configuration Registry key --> <Component Id="Configuration_Registry" Guid="{some GUID}" KeyPath="yes"> <RegistryKey Id="Config_Registry" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="no" Root="HKLM" Key="SOFTWARE\Some\Registry\Path"> <RegistryValue Type="string" Name="Configuration" Value="[CONFIGURATION]:[SOMEPORTNUM]"/> </RegistryKey> <Condition><![CDATA[(NOT(CONFIGURATION="CONFIGURATION")) AND (SOME_OTHER_PROPERTY="0")]]></Condition> </Component> <Property Id="CONFIGURATION" Secure="yes" SuppressModularization="yes"/> So basically if the Property CONFIGURATION equals CONFIGURATION do nothing... You seem to be doing quite a lot... Steve -----Original Message----- From: TimM [mailto:timmay...@smarttech.com] Sent: June-18-13 6:00 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Passing properties to merge modules Okay I am trying this out and I can not seem to get it working. We are using WiX 3.7 and all it seems to do is delete the property. Maybe I am missing something really easy and it is just escaping me. Here is what I have: In Merge Module: <Property Id="FOO" Value="0" /> <Configuration Name="fooProperty" Format="Integer" DefaultValue="[FOO]"/> <Substitution Table="CustomAction" Row="setFoo" Column="Target" Value="[fooProperty]"/> <CustomAction Id="setFoo" Property="FOO" Value="[FOO]" Execute="immediate" /> <InstallExecuteSequence> <Custom Action="setFoo" After="CostInitialize" /> </InstallExecuteSequence> In Parent project: <DirectoryRef Id="INSTALLDIR"> <Merge Id="CoreSharedDrivers" Language="1033" SourceFile="$(var.PROJECT_ROOT)/installs/x86/$(var.Configuration)/CoreSharedDrivers.msm" DiskId="1"> <ConfigurationData Name="fooProperty" Value="[FOO]"/> </Merge> </DirectoryRef> The main differences are I am using DirectoryRef, formatting to Interger, and the property is not initially defaulted to a value in the parent install, it is only valid if passed on command line.. Here is bits of the install log: MSI (s) (BC:B8) [15:46:28:947]: Command Line: FOO=1 CURRENTDIRECTORY=c:\Users\timm\Desktop CLIENTUILEVEL=2 CLIENTPROCESSID=3856 MSI (s) (BC:B8) [15:46:29:072]: PROPERTY CHANGE: Adding FOO property. Its value is '1'. MSI (s) (BC:B8) [15:46:43:431]: Doing action: Set_FOO Action start 15:46:43: Set_FOO. Action ended 15:46:43: Set_FOO. Return value 1. MSI (s) (BC:B8) [15:46:43:603]: Doing action: setFoo.F5F26EB0_E10F_4C42_9337_E3138BE966BC MSI (s) (BC:B8) [15:46:43:603]: *PROPERTY CHANGE: Deleting FOO.F5F26EB0_E10F_4C42_9337_E3138BE966BC property. Its current value is '0'.* Action start 15:46:43: setFoo.F5F26EB0_E10F_4C42_9337_E3138BE966BC. Action ended 15:46:43: setFoo.F5F26EB0_E10F_4C42_9337_E3138BE966BC. Return value 1. Property(S): FOO = 1 So if you can see what I might be doing wrong I would appreciate finding out... Thanks, Tim. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Passing-properties-to-merge-modules-tp5417112p7586685.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie on June-18-13 6:24:50 PM. The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users