cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

Merge Module target path

I have a merge module that has several components. Some of the files are installed to system32 folder. Some need to be installed to the consuming application's installation directory (INSTALLDIR).

I have the components I want installed to the consuming application's INSTALLDIR destination set to [INSTALLDIR].
I have the other components set to [SystemFolder].

In my MSI I right click on the merge module and make sure it is set to use the merge module defaults. The problem is that the [INSTALLDIR] value for merge module components never gets identified with the [INSTALLDIR] for the consuming application and so they install to the root of the system drive. The system files install correctly however.

If I right click on the Merge Module and set the target to be [INSTALLDIR] then all components are installed to the application's [INSTALLDIR].

What am I doing wrong here to ensure that those files destined for [INSTALLDIR] go where I want them to go?
Labels (1)
0 Kudos
(1) Reply
DLee65
Level 13

I found a solution. Basically when a merge module is consumed the value 'INSTALLDIR' is 'INSTALLDIR.' which is the value assigned by the merge module when it is saved.

To fix this I first opened the merge module. Go to the Files and folders view and you will see there [INSTALLDIR.]. Right click on this and select properties. Copy the Source Location value. Open your MSI project and go to Direct Editor. Select the Directory view and add a new entry. Add the copied value as the new directory, the parent will be [INSTALLDIR] and the sub directory will be simply a '.' [dot] character. This allowed me to make sure that the merge module files get installed to the appropriate directories.

Perhaps there is a better way to manage this scenario. I am always open to learn something new. 🙂
0 Kudos