0

I am trying to set the override the destination directory of the merge module as described here. I set the destination directory to [BIN]. BIN is public property. At compile time the value of [BIN] is C:\Program Files (x86)\CompanyName\ProductName.

Based on the user input in a custom dialog, this property is updated to C:\Program Files (x86)\CompanyName\UserInputName\ProductName.

All the DLL files from the merge module are copied into the compile-time value of [BIN] - C:\Program Files (x86)\CompanyName\ProductName. For some reason, the dynamic value is ignored in this case.

Can someone tell me what could be going wrong?

I am using Install Shield Version 2010 Professional Edition, Project Type is Basic MSI Project

bugfreerammohan
  • 1,471
  • 1
  • 7
  • 22
Dinesh
  • 311
  • 2
  • 12
  • You would probably need to attach a verbose log file. For example: MSIEXEC /i "example.msi" /l*v "c:\temp\yourlog.log" etc. – Captain_Planet Apr 11 '19 at 13:28

2 Answers2

0

Merge Modules add a GUID to every primary key to prevent merge collisions. So the BIN identifier actually turns into BIN.G_U_I_D when used in a Merge Module.

To resolve this issue, Merge Modules are designed to be "retargetable".

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • The Merge Module is designed to be "retargetable", otherwise it would not be possible to change the destination directory in installshield, even statically. – Dinesh Apr 15 '19 at 10:23
0

I have posted the same question on InstallShield forum, the conclusion there was it is not supported by InstallShield to change destination directory of an MSM file during run time.

A workaround suggested is to have a custom action 'Set Directory'.

Here are the steps:

  1. In the Redistributable view, right click on the MSM file -> Properties -> Destination -> set to [MSM_DEST_STATIC_DIR].
  2. Create a custom action of type'Set Directory', with Directory Name - MSM_DEST_STATIC_DIR, Directory Value - [MSD_DEST_DIR_DYNAMIC_VALUE]
  3. After getting the user input from the dialog, first, update the MSD_DEST_DIR_DYNAMIC_VALUE, then execute the custom action created in step 2.

While doing this I also realized that it is not possible to update the IISROOTFOLDER based on the dynamic user input. I followed the same procedure with the custom action to update the IISROOTFOLDER.

Dinesh
  • 311
  • 2
  • 12