Dear Support Community, I have a really big issue. I have created a merge module called TestMergeModule. This module installs some files and writes two or three values into the registry. Now, I want to write some installation logic for this merge module. Installation logic:
1.) Install merge module only if you can find in the registry under SOFTWARE/company/Version the value "3.2". 2.) Run custom action, defined in WIX merge module, only if you found the previous value in the registry. <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:utils="http://schemas.microsoft.com/wix/UtilExtension"> <Module Id="TestMergeModule" Language="1033" Version="1.0.0.0"> <Package Id="7BE6D5A6-3191-4D81-9637-645D5F9F08FA" Manufacturer="doris company" InstallerVersion="301" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="MergeRedirectFolder"> <Directory Id="INSTALLLOCATION"> <Component Id="cubr10.dll" Guid="3D44F60D-D6EF-4c10-9CE4-8F722F6BCB95" SharedDllRefCount="yes"> <File Id="cubr10.dll" Source="..\cubr10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cuct10.dll" Guid="FEFBBCB1-D68A-4929-9AF7-DDC22342F3B0" SharedDllRefCount="yes"> <File Id="cuct10.dll" Source="..\cuct10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cudw10.dll" Guid="47C93178-4515-484b-8225-43125421E432" SharedDllRefCount="yes"> <File Id="cudw10.dll" Source="..\cudw10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cull10.dll" Guid="9CC8AA4E-D270-4ba9-B5C3-798ECC843A95" SharedDllRefCount="yes"> <File Id="cull10.dll" Source="..\cull10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id=" m280doris.exe" Guid="DA32B7DD-44D1-428f-9BAD-1101B5B752BD" SharedDllRefCount="yes"> <File Id=" m280doris.exe" Source="..\m280doris.exe" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="RegistryEntries" Guid="44B91549-8D88-498F-9FF5-C5F00D855480"> <RegistryKey Root="HKLM" Key="SOFTWARE\company" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Name="HelpXmlPath" Value="[INSTALLLOCATION]" /> <RegistryValue Type="string" Name="UserHelp" Value="SUser.chm" /> </RegistryKey> </Component> </Directory> <Directory Id="SystemFolder"> <Component Id="s200res.dll" Guid="8E15A9DD-CFBF-4eee-9916-E93DF2B53101" SharedDllRefCount="yes"> <File Id="s200res.dll" Source="..\S200res.dll" KeyPath="yes" Checksum="yes"></File> <Component> <Directory> </Directory> </Directory> <CustomAction Id='RegisterM280DorisExe' Directory='INSTALLLOCATION' ExeCommand='"[INSTALLLOCATION]M280Doris.exe" /regserver'></CustomAction> <InstallExecuteSequence> <Custom Action='RegisterM280DorisExe'After='InstallFinalize'>NOT INSTALLEDS200VERSION</Custom> </InstallExecuteSequence> </Module> </Wix> The above merge module works fine. Now I add the installation logic as follows: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:utils="http://schemas.microsoft.com/wix/UtilExtension"> <Module Id="TestMergeModule" Language="1033" Version="1.0.0.0"> <Package Id="7BE6D5A6-3191-4D81-9637-645D5F9F08FA" Manufacturer="doris company" InstallerVersion="301" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="MergeRedirectFolder"> <Directory Id="INSTALLLOCATION"> <Component Id="cubr10.dll" Guid="3D44F60D-D6EF-4c10-9CE4-8F722F6BCB95" SharedDllRefCount="yes"> <File Id="cubr10.dll" Source="..\cubr10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cuct10.dll" Guid="FEFBBCB1-D68A-4929-9AF7-DDC22342F3B0" SharedDllRefCount="yes"> <File Id="cuct10.dll" Source="..\cuct10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cudw10.dll" Guid="47C93178-4515-484b-8225-43125421E432" SharedDllRefCount="yes"> <File Id="cudw10.dll" Source="..\cudw10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="cull10.dll" Guid="9CC8AA4E-D270-4ba9-B5C3-798ECC843A95" SharedDllRefCount="yes"> <File Id="cull10.dll" Source="..\cull10.dll" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id=" m280doris.exe" Guid="DA32B7DD-44D1-428f-9BAD-1101B5B752BD" SharedDllRefCount="yes"> <File Id=" m280doris.exe" Source="..\m280doris.exe" KeyPath="yes" Checksum="yes"></File> </Component> <Component Id="RegistryEntries" Guid="44B91549-8D88-498F-9FF5-C5F00D855480"> <RegistryKey Root="HKLM" Key="SOFTWARE\company" Action="createAndRemoveOnUninstall"> <RegistryValue Type="string" Name="HelpXmlPath" Value="[INSTALLLOCATION]" /> <RegistryValue Type="string" Name="UserHelp" Value="SUser.chm" /> </RegistryKey> </Component> </Directory> <Directory Id="SystemFolder"> <Component Id="s200res.dll" Guid="8E15A9DD-CFBF-4eee-9916-E93DF2B53101" SharedDllRefCount="yes"> <File Id="s200res.dll" Source="..\S200res.dll" KeyPath="yes" Checksum="yes"></File> <Component> <Directory> </Directory> </Directory> <Property Id="INSTALLEDSVERSION" > <RegistrySearch Id="RegistrySearchInstalledSVersion" Type="raw" Root="HKLM" Key="SOFTWARE\company" Name="Version"></RegistrySearch> </Property> <CustomAction Id="OtherVersionOfSProductInstalled" Error="Another version of the S Product family is already installed."></CustomAction> <CustomAction Id='RegisterM280DorisExe' Directory='INSTALLLOCATION' ExeCommand='"[INSTALLLOCATION]M280Doris.exe" /regserver'></CustomAction> <InstallExecuteSequence> <Custom Action='OtherVersionOfSProductInstalled' Before='LaunchConditions'><![CDATA[INSTALLEDSVERSION AND INSTALLEDSVERSION<>"3.2"]]></Custom> <Custom Action='RegisterM280DorisExe'After='InstallFinalize'>NOT INSTALLEDSVERSION</Custom> </InstallExecuteSequence> </Module> </Wix> The problem is that the custom action is never invoked? This happens at the moment when I add the Property "INSTALLEDSVERSION". My question to you is why this happens? How can I solve this problem? It is really necessary that a merge module has its own installation logic. Because in the future we don't need any more this merge module. Please help me. Kind regards, Christian ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users