Search code examples
wixwix3wix3.8

Wix installer - copy attribute value to another attribute


What I want to do is copy the value of a single property, and place it as the value of another property. Is this possible with Wix?

<Property Id="PROP1" Value="default"  Secure="yes"/>

I want PROP2 to have the same value some where during the UI sequence.


Solution

  • You can use Custom action to accomplish it. Define action as

    <CustomAction Id="SetMyProperty" Execute="immediate" Property="PROP2" Value="[PROP1]" />

    Then call it in <InstallUISequence> or <InstallExecuteSequence> when you need it set, something like

    <Custom Action="SetMyProperty" After="FileCost"></Custom>