windows安装程序-Wix工具集-是否有一种方法可以在控件内基于RadioButtonGroup值设置属性



我想做的是基于RadioButtonGroup控件中的选定RadioButton设置或取消设置属性(CREATE_USER)。这可能吗?

注意:下面的例子对我不起作用。

# 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>

将Publish元素放在具有更高级别的对话框的"下一步"按钮上,或者将它们安排为执行序列中的set属性自定义操作。这取决于您的静默安装故事以及您何时/如何处理该物业。记住,在静默安装中,UI序列不会被处理。