Hi everyone,

I've got a question about merge modules.
I've written a merge module and I would like the files of the merge module to install themselves in the directory that the user selects while installing the main package.

Example:
*Merge Module:
Program Files
 My Product
   bin
     ApmFile.dll

*Product
Program Files
Alternate Product Dir--> the user selected a different directory than My Product2
   bin
     amEngine.exe
-->I would like ApmFile to be installed in the same directory (ie : Program Files -> Alternate Product Dir -> bin)

Is there a way to achieve this?

Here's my merge module:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
<Module Id="Module_Test" Language="1033" Version="$(var.MY_PRODUCT_FILEVERSION_STRING)"> <Package Id="504C56F7-1374-424F-B624-157E502CB661" Description='My Product' Manufacturer="$(var.MY_COMPANYNAME_STRING)" />
   <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id='ProgramFilesFolder' Name='PFiles'>
       <Directory Id="MyProduct" Name="My Product">
         <Directory Id="WIXUI_INSTALLDIR" Name="The Api">
           <Directory Id="bin" Name="bin">
<Component Id="MY_PRODUCT_API_MAIN" Guid="DC8244DB-25AD-402B-8691-2061797709B1"> <File Id="ApiFile.dll" Name="ApiFile.dll" Source="$(var.FACT_DESTDIR)\shared_lib\ApiFile.dll" KeyPath="yes" />
             </Component>
           </Directory>
         </Directory>
       </Directory>
     </Directory>
   </Directory>
 </Module>
</Wix>


The Product wxs goes this way:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
<Product Id="83D19A5A-3579-2740-8989-626BC62A66F5" Language="1033" Manufacturer="$(var.MY_COMPANYNAME_STRING)" Name="My Product2 $(var.MY_PRODUCT_PRODUCTVERSION_STRING)" Version="$(var.MY_PRODUCT_FILEVERSION_STRING)" UpgradeCode='1F60EB8D-A0A4-4224-BF1E-C66E3F9CC35E'>
   <Package Description='Engine Installer' Compressed="yes" />
   <Upgrade Id='1F60EB8D-A0A4-4224-BF1E-C66E3F9CC35E'>
<UpgradeVersion OnlyDetect='yes' Property='PATCHFOUND' IncludeMinimum='yes' Minimum='7.17.001.1' />
   </Upgrade>
   <InstallExecuteSequence>
     <RemoveExistingProducts After="FindRelatedProducts" />
   </InstallExecuteSequence>
   <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
   <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id='ProgramFilesFolder' Name='PFiles'>
       <Directory Id="MyCompany" Name="MyCompany">
         <Directory Id="IAM" Name="IAM">
           <Directory Id="MyProduct2" Name="My Product2">
             <Directory Id="APM_ENGINE_INSTALLDIR" Name="Engine">
               <Directory Id="bin" Name="bin">
<Merge Id="Module_Test.504C56F7-1374-424F-B624-157E502CB661" Language="1033" SourceFile="MyModule.msm" DiskId="1" /> <Component Id="APM_ENGINE_MAIN" Guid="FC95C3A7-085E-4EF5-8018-6E0CDA2A4085"> <File Id="amengine.exe" Name="amengine.exe" Source="$(var.FACT_DESTDIR)\bin\amengine.exe" KeyPath="yes" />
                 </Component>
               </Directory>
             </Directory>
           </Directory>
         </Directory>
       </Directory>
     </Directory>
   </Directory>
   <UI />
   <Property Id="WIXUI_INSTALLDIR" Value="APM_ENGINE_INSTALLDIR" />
   <Property Id="PORTNUMBER" Value="4200" />
   <UIRef Id="APM_EngineUI" />
   <UIRef Id="WixUI_ErrorProgressText" />
<Feature Id="Engine" Level="1" Display="expand" Title="Engine" Description="Engine">
     <ComponentRef Id="APM_ENGINE_MAIN" />
     <MergeRef Id="Module_Test.504C56F7-1374-424F-B624-157E502CB661" />
   </Feature>
 </Product>
</Wix>

begin:vcard
fn;quoted-printable:Fr=C3=A9d=C3=A9ric Viollet
n;quoted-printable:Viollet;Fr=C3=A9d=C3=A9ric
org:Bull, Architect of an Open World (TM);Evidian S.A.
adr;quoted-printable:;;Rue Jean Jaur=C3=A8s;Les Clayes Sous Bois;;78340;France
email;internet:[EMAIL PROTECTED]
title:Software Engineer
tel;work:01 30 80 77 34
url:http://www.evidian.com - http://www.bull.com
version:2.1
end:vcard

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to