Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Dynamic Destination

2 replies to this topic


  • Members
  • 15 posts

Posted 07 March 2002 - 02:24

[for a home-made MM].  I need to set the install location for the merge-module at run-time [as determined by the presence/absence of a registry key (path) of another product].

What I did was this:
Set the Merge Module's INSTALLDIR to TARGETDIR [I tried setting it to  .  (even via a property) but ISD7 wouldn't allow it].  Then, in the main project, set the merge module's Properties>General>Destination to [PROPERTYNAME]--corresponding to the property which is determined at run-time for the destination.

Building fails, reporting |"can't merge merge-module blah...."|

If I use a predefined property, it works--unfortunately, that is not an option.

This is VERY important, because we're going to have 47 [home-grown] merge-modules in this release.  And they will all have run-time determined destinations [yes, we are insane].


  • Members
  • 11 posts

Posted 27 June 2002 - 09:32

Maybe MMs are different but this is how I set the Target dir from an msi.

1. Add custom property APPDIR to property table
2. Add reg search MYREGSEARCH to reglocator table
3. Add APPDIR MYREGSEARCH to Appsearch table
4. Add AppSearch action to Execute and UI sequences, very early on.

Now when install runs the registry entry is in the APPDIR property. In my case the value of the APPDIR is the directory we wish to install to.

Then add Custom Action 51 to CustomAction table

Finally add this custom action to the UI and execute sequences, AFTER the appsearch actions runs.

It works for me. Hope that helps.



  • Full Members
  • 532 posts

Posted 16 July 2002 - 02:18

What you can do is create your MM with its default location at what you want.

Then in you Main project, use the directory table, and add and entry called
INSTALL.<PACKAGE CODE oof MM> and give it a global property parent.

then you can set the above property to what ever you want and your MM should be installed under that.