Specify a different destination folder for each component

Got a problem you cannot solve? Try here.
phil3k
Posts: 2
Joined: Tue Dec 13, 2005 7:12 am

Specify a different destination folder for each component

Postby phil3k » Tue Dec 13, 2005 9:55 am

How is it possible to allow different destination folders for different components being specified ? For Example the user decides to install component A to E:\\somewhere and component B to D:\\somewhereelse

I tried various approaches including different $TARGETDIR$ variables, but the problem is how can I fetch the user event resulting from a component selection and how can I modify a Text Field holding a set of different installation destinations.

Is such scenario possible ?

Do I have to build seperate installers ??

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Tue Dec 13, 2005 1:52 pm

Sure, there are many ways to achieve this. What you want to do is store the target folders for each component in its own variable, say TARGETONE, TARGETTWO, etc. In the Install Files commands for the components you can just use these new variables as the target folders for the files being installed.

I'd also show the destination dialog once for each component. The pre-built destination dialog already has the logic and controls in place to work with TARGETDIR. So before calling the dialog, I'd assign TARGETDIR to the value of, for example, $TARGETONE$, and after the dialog returns, I'd reassign TARGETONE to $TARGETDIR$ using the Set Variable commands.

This is just one way to do it. You can insert multiple edit fields on a dialog to capture each target variable all at once as well. Its all up to you!

phil3k
Posts: 2
Joined: Tue Dec 13, 2005 7:12 am

Postby phil3k » Wed Dec 14, 2005 6:42 am

Yes, that's what I thought, but what I'd like to have it the "Microsoft" way, they let you specifiy the different component destinations using a single text field with a Browse button. When selecting different components the text field changes to the selected component destination.

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Wed Dec 14, 2005 8:19 am

You might be able to achieve something like this using the dialog editor and dialog rules...by hiding and showing fields as different items are selected on the tree control. I'm not sure how right off the bat though.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 132 guests