[wix-users] Change install location of a merge module with MSI

viharika reddy viharikareddygopu at gmail.com
Wed Feb 19 08:02:13 PST 2020


Thank you, Steven.

I have updated my merge module like yours with MergeRedirectFolder and
adjusted the merge module entry in product.wxs accordingly. It is working
fine now.
Thanks a lot.

Regards,
Viharika

On Wed, Feb 19, 2020 at 9:12 PM Steven Ogilvie <stogilvie at genetec.com>
wrote:

> Hi Viharika,
>
> Here is what I have:
>
> In my Merge Module:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
>   <?include $(var.SolutionDir)\Includes\Variables.wxi ?>
>   <Module Id="MyFileMergeModule" Language="1033"
> Version="!(bind.fileVersion.file_MyFile)">
>     <Package Id="ADD A GUID" Manufacturer="$(var.ProductCompany)"
> InstallerVersion="500" />
>
>     <Directory Id="TARGETDIR" Name="SourceDir">
>       <Directory Id="MergeRedirectFolder">
>
>         <Component Id="cmp_MyConfig" Guid="{A GUID}">
>
> In my Product.wxs:
>
> <Fragment>
>     <Directory Id="TARGETDIR" Name="SourceDir">
>
>       <Directory Id="DIRECTORY_PATH_MYPATH" DiskId="1">
>         <Component Id="Cmp_RemoveDir" Guid="{ANOTHER GUID}">
>           <RemoveFolder Id="RemoveFolder" Directory="DIRECTORY_PATH_MYPATH"
> On="uninstall" />
>         </Component>
>
>         <Merge Id="MyMergeModule"
> SourceFile="$(env.MyPath)\Installers\wixlibx64\MMergeModule.msm"
> Language="1033"/>
>
>
> Steve
>
> > -----Original Message-----
> > From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
> > viharika reddy via wix-users
> > Sent: February 19, 2020 10:16 AM
> > To: wix-users at lists.wixtoolset.org
> > Cc: viharika reddy <viharikareddygopu at gmail.com>
> > Subject: [wix-users] Change install location of a merge module with MSI
> >
> > Hello,
> >
> > I am creating a merge module and including it in a MSI. Both the merge
> > module and MSI package are installing files in
> > *<ProgramFiles>\company\version* folder successfully when I install the
> > MSI package in default location. If I change the install location of MSI
> package
> > to "*C:\test*" then the MSI package installing the files in
> > "C:\test\company\version" folder as expected but the merge module is
> still
> > installing the files in default location i.e.
> > *<ProgramFiles>\company\version* folder.
> >
> > What changes need to be done to merge module wxs file to install the
> files
> in
> > the location specified by user during MSI package installation? In short,
> I
> > want to set the INSTALLDIR of MSI package to merge module as well.
> >
> > Below is the directory structure of my merge module wxs file.
> >
> > <Directory Id="TARGETDIR" Name="SourceDir">
> >   <Directory Id="ProgramFilesFolder">
> > <Directory Id="INSTALLDIR">
> >  <Directory Id="COMPANY" Name="company"> <Directory Id="VERSION"
> > Name="1.0.0"> </Directory>  </Directory> </Directory>
> >   </Directory>
> > </Directory>
> >
> > Regards,
> > Viharika
> >
> > __________________________________________________________
> > __________
> > WiX Toolset Users Mailing List provided by FireGiant
> > https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> > firegiant.com%2F&data=02%7C01%7Cstogilvie%40genetec.com%7Ce65
> > cb7bd907242a3544608d7b54eb5c5%7C7ba8d2fb46604a19802e4d015a17e167
> > %7C0%7C0%7C637177221988006705&sdata=zekOYg2X8IDPZmAIiTuGViR
> > 2B5%2B0CSAHpXCQgR4HVYc%3D&reserved=0
>



More information about the wix-users mailing list