MSI - WiX CustomAction

I have a custom action that shows a list of application pools on the system and you want to bind these values ​​in a combobox that is inside customdlg.wxs, and while doing MSI setup I have to get a combobox showing a list of application pools.

Can anyone point me to how to bind values ​​to a combobox?

custom action

//List all App pools    
public static ActionResult GetAppPools(Session session)
{
    using (ServerManager iisMgr=new ServerManager())
    {
        System.Collections.IEnumerator ie = iisMgr.ApplicationPools.GetEnumerator();
        List<string> apppools = new List<string>();

        while (ie.MoveNext())
        {
            apppools.Add(((Microsoft.Web.Administration.ApplicationPool)(ie.Current)).Name);
        }
    }
    return ActionResult.Success;
}

      

customdlg.wxs

<Control Id="ApplicationPoolLabel" Type="Text" Y="94" X="11" Width="349"  Height="16" TabSkip="no" Text="Application Pool: " />
<Control Id="ApplicationPoolCombo" Type="ComboBox" Y="94" X="100" Width="150" Height="16" ToolTip="Application Pool" Property="APP_POOL" Text="{80}">
    <ComboBox Property="APP_POOL">
        <ListItem Text="[APP_POOL]" Value="[APP_POOL]" />
    </ComboBox>
</Control>

      

+3


source to share





All Articles