sleon
sleon

Reputation: 173

Wix Toolset - Is there a way to set a property based on RadioButtonGroup value within the control?

What I'd like to do is to set, or alternatively unset, a property (CREATE_USER) based on a selected RadioButton within a RadioButtonGroup control. Is this possible?

Note: The example below does NOT work for me.

# Placed under Fragment tag
<Property Id="SQL_USER_TYPE" Value="ExistingSqlUser" />

# Placed under Dialog tag
<Control Id="SqlUserType" Type="RadioButtonGroup" X="40" Y="134" Width="210" Height="15" Property="SQL_USER_TYPE">
    <RadioButtonGroup Property="SQL_USER_TYPE">
        <RadioButton Value="NewSqlUser" X="90" Y="0" Width="80" Height="15" Text="!(loc.TenantDBConnectDlg_CreateNewUser)" />
        <RadioButton Value="ExistingSqlUser" X="0" Y="0" Width="80" Height="15" Text="!(loc.TenantDBConnectDlg_UseExistingUser)" />
    </RadioButtonGroup>
    <Publish Property="CREATE_USER" Value="1">SQL_USER_TYPE = "NewSqlUser"</Publish>
    <Publish Property="CREATE_USER" Value="{}">SQL_USER_TYPE = "ExistingSqlUser"</Publish>
</Control>

Upvotes: 2

Views: 1361

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55581

Put the Publish elements on the Next button of the dialog with a higher or schedule them as set property custom actions in the execute sequence. It depends on your silent installation story and when/what you are doing with the property. Remember in silent install UI sequence isn't processed.

Upvotes: 2

Related Questions