tags:

views:

175

answers:

1

Can I use a property in a Feature title and description, a shortcut name etc. The value of the property is being set via a custom action before LaunchConditions. I’ve tried something like

<Feature Id="Complete" Title="[APPNAME]" Description="[APPNAME] Installation" …>

but I just get a feature title [APPNAME], not the name of my application which I set via the custom action.

+1  A: 

The bracket syntax for referencing properties in values is a feature of Windows Installer itself. More specifically, it is a feature of the Formatted data type. Unfortunately, the Feature table's Title and Description fields are of type Text, which means the values are interpreted literally (as you observed).

If you really want or need to do this, I think you'd have to create a custom action that modifies the contents of the Feature table. A custom action using DTF (Deployment Tools Foundation) would be one way of approaching this.

Daniel Pratt
IIRC, you cannot modify existing rows of an MSI. That means you'd have to build the Feature tree dynamically. I'm not sure that is even possible, it might be if you run early enough.
Rob Mensching