- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Merge Module - Dynamic destination directory based on user dialog input
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
- I am trying to set the override the destination directory of the merge module as described here. I set the destination directory to [BIN].
- 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 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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
I could think of one more solution for the resolving this on run-time. What you can do is:
- Make sure you create one directory entry say ISMyOwnDirectory as discussed in previous thread which is derived from ISMyProductDir
- Make sure merge module's destination property points to ISMyOwnDirectory
- On selecting directory that you choose on runtime,set the value to specific property say [BIN]
- Just after this, execute custom action of type SetDirectory which sets the directory value of ISMyOwnDirectory to property value [BIN]
- Make sure to set sequence properly,in your case it should happen before filetransfer
- Check the attached snapshot for SetDirectory customaction though it might not exactly fit into your requirement(In terms of sequence i meant)
- After installing ,files of mergemodule will go to the directory that you picked up runtime.
i could see this working by having compile-time property value of [BIN]-C:\Users\<username>\Desktop\<FolderName>
Hope it helps,
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
See the below link, it is almost similar to your issue.
Apart from that if you want to control destination path at runtime using a dialog, you have to configure a public property that need to be selected in the mergemodule destination, as well same property need to be initialized at runtime.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
[BIN] is a public property which I update it during run time. For some reason, the new value is ignored.
any clue why might be wrong here?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Depends on where you are calling for it.
If it’s a Deferred Custom Action the Property [BIN] won’t make it over.
Search for CustomActionData on how to handle Properties between immediate and deferred actions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
There is specific note from InstallShield side:
Note: This procedure redirects only the TARGETDIR directory in the merge module, or directories that derive directly from TARGETDIR. If the merge module is configured to send files to a predefined folder (for example, SystemFolder), you cannot override the module’s destination.
So it deals with Directory table entries.I had tried below:
- Create a new directory entry say MyOwnDirectory which has ISMyProductDir as parent directory
- Selected that [MyOwnDirectory] from destination property of mergemodule
- After installing i could see mergemodule files going to MyOwnDirectory
- If you could make directory entry which has TARGETDIR as derived will work at Runtime
- Note:ISMyProductDir->ISMyCompanyDir->ProgramFilesFolder->TARGETDIR which is TARGETDIR derived
Hope it helps,
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
@Jeinifer
Thanks
Exactly, the procedure which you have mentioned also works for me. In the Installshield, I seleted the destination of the merge module to be [BIN] directory. The files go into this directory, everything same like you explained.
However, if I change the value of the [BIN] during run time based on user input, the files still go into the same directory i.e value of [BIN] during compile time. It doesn't respect the new value of [BIN]. ( I verifed the update of [BIN] variable using a message box)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
I could think of one more solution for the resolving this on run-time. What you can do is:
- Make sure you create one directory entry say ISMyOwnDirectory as discussed in previous thread which is derived from ISMyProductDir
- Make sure merge module's destination property points to ISMyOwnDirectory
- On selecting directory that you choose on runtime,set the value to specific property say [BIN]
- Just after this, execute custom action of type SetDirectory which sets the directory value of ISMyOwnDirectory to property value [BIN]
- Make sure to set sequence properly,in your case it should happen before filetransfer
- Check the attached snapshot for SetDirectory customaction though it might not exactly fit into your requirement(In terms of sequence i meant)
- After installing ,files of mergemodule will go to the directory that you picked up runtime.
i could see this working by having compile-time property value of [BIN]-C:\Users\<username>\Desktop\<FolderName>
Hope it helps,
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Please open the built .msi file in Direct Edit mode and look at the Directory table. I guess you will see that the destination property for the files from the merge module is not BIN but BIN with the merge module's GUID attached.
InstallSite.org
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
I think that is the feature that InstallShield has today with compile time directory entries for mergemodule destination directory.The same directory set(compile-time) applies to many other features by implementation itself.If you feel like it can make value to the product,you can raise enhancement request which can be validated by the team.
Glad you could get the solution.
Thanks,
Jenifer
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)