PDA

View Full Version : INSTALLDIR not being populated



Chocsa
01-16-2005, 06:20 PM
Hi,
has anyone come across this. Create a WI merge module use the INSTALLDIR property in the module, say for a reg key, run it. Works fine.
Change that WI merge module to an IS merge module, re complie it, run it. Now the INSTALLDIR in the Merge module no longer gets populated! Also, tried TARGETDIR and that did not work either.
Is this a bug, if so what's the work around?

Thanks in Adv

phill_mn
06-22-2005, 04:08 PM
What I do is:
a) Design a WI Merge Module that uses INSTALLDIR as the destination for components or registry values.
b) In an IScript project - Object View drag the Merge Module into a feature, which creates the Merge Mould Holder
c) Right-Click on the Merge Module and select Properties
d) Set the Destination Property of that Merge Module to [TARGETDIR]

In my case I am installing several applications in a tree under the TARGETDIR path, so to get the Merge Module to install to the correct subfolder I also have to create OnInstalling and OnUninstalling handler functions (for the feature that holds the Merge Module Holder) that has the following code
VarSave(VAR_SRCTARGETDIR);
TARGETDIR = TARGETDIR ^ _SUB_DIR_NAME;

And in the OnInstalled and OnUninstalled I add this code

VarRestore(VAR_SRCTARGETDIR);



Hope this helps
Phill