cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
needer
Level 4

How to get each Feature's destination in Basic MSI Project

Here we go

I have a Basic MSI Project with many Feature, each Feature have the different destination, i want to get each Feature destination and write them into web.config file.

So anyone can help me to get these destination?:confused:
Labels (1)
0 Kudos
(8) Replies
RobertDickau
Flexera Alumni

Can you use expressions such as [INSTALLDIR], [OTHERDIR], and so forth, in your XML change settings?
0 Kudos
needer
Level 4

RobertDickau wrote:
Can you use expressions such as [INSTALLDIR], [OTHERDIR], and so forth, in your XML change settings?


i can't understand this very clearly,:confused: could you give me more material info?thank you.
0 Kudos
needer
Level 4

Thanks for all reply, but i still can't understand how should i do about this.
So anyone can give some material suggestion.

i am so crash on this question.
0 Kudos
RobertDickau
Flexera Alumni

The two sides of this are getting the destination values, and then writing them to the system.

As for getting the destination value, look in the Features view for the feature and destination you want; it should look like [INSTALLDIR] or [FEATURE_DEST] or whatever directory-property name you used.

You should then be able to use that expression ([INSTALLDIR], etc.) as the data in (for example) the INI changes view, registry changes view, or XML changes view.
0 Kudos
needer
Level 4

RobertDickau wrote:
The two sides of this are getting the destination values, and then writing them to the system.

As for getting the destination value, look in the Features view for the feature and destination you want; it should look like [INSTALLDIR] or [FEATURE_DEST] or whatever directory-property name you used.

You should then be able to use that expression ([INSTALLDIR], etc.) as the data in (for example) the INI changes view, registry changes view, or XML changes view.


Here is the situation:

There are two Features in this Project, let's call them Features No.1 and Features No.2, i want install Features No.1 to C:\Inetpub\wwwroot, the Features No.2 will install to C:\Program Files, both of them can set destination by user, so i change two features destination value to [INSTALLDIR], and write them into web.config file, but after install i get the same destination value in file, so is there any inaccurate with my project?
0 Kudos
RobertDickau
Flexera Alumni

That's right: if you want the features' files to be installed into two different locations, you'll need to use a different destination property for each one. If you use [INSTALLDIR] for both, changing INSTALLDIR for one feature will change it for both of them.
0 Kudos
DLee65
Level 13

Needer, I am not sure if I understand you correctly. It sounds as if you are trying to use Feature locations in a basic MSI install to specify where files should be installed.

Actually Feature directories do not determine where files are installed, component destinations do. So if files are showing up in the wrong directory it is because your component destination is not correct.

As for writing these destinations to a .config file see Robert's posts.
0 Kudos
RobertDickau
Flexera Alumni

And to tack on a bit to Dan's answer: the component destination is indeed where the files will go, but features are what the user sees; so if you want the user to be able to browse for separate directories for each feature, you'll want two destinations, and use each for one feature-component pair.

The help topic "Component Destination vs. Feature Destination" says a bit more about it.
0 Kudos