Bogdan Verbenets
Bogdan Verbenets

Reputation: 26912

properties attached to UI don't get changed

In my WiX install package I define a property, then define a textbox that uses this property, then pass this property to my custom action. But inside of the custom action I find out that the property has it's default value, not the one I've specified in the textbox. How can I fix that?

<Property Id="DataSource" Value="."/>
<Control Id="DataSourceText" Type="Edit" Text="." Height="17" Width="150" X="200" Y="18" Property="DataSource"/>

then later in the code

    <CustomAction Id="SetCustomActionDataValue" Return="check" Property="CreateDatabase" Value="DataSource=[DataSource]" />
    <CustomAction Id="CreateDatabase" BinaryKey="Binary1" DllEntry="CreateDatabase" Execute="deferred" Return="ignore"/>
    <InstallExecuteSequence>                
        <Custom Action='SetCustomActionDataValue'  After="InstallFiles"/>
        <Custom Action='CreateDatabase'  After="SetCustomActionDataValue">NOT Installed AND NOT PATCH</Custom>
    </InstallExecuteSequence>

Upvotes: 2

Views: 514

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55601

Any properties that you intend to modify in the UI sequence and use in the Execute sequence must be Secure Custom Properties.

Upvotes: 3

Related Questions