Hello WiX users,

 

I've created custom action to load websites list from IIS. 

 

View listBoxView;

DirectoryEntry iisRoot;

int order;

 

listBoxView = session.Database.OpenView("select * from ListBox");

iisRoot = new DirectoryEntry("IIS://localhost/W3SVC");

 

order = 1;

foreach (DirectoryEntry webSite in iisRoot.Children)

{

    if (webSite.SchemaClassName.ToLower() == "iiswebserver" &&

        webSite.Name.ToLower() != "administration web site")

    {

        StoreWebSiteDataInListBoxTable(webSite, order, listBoxView);

        order++;

    }

}

.............

private static void StoreWebSiteDataInListBoxTable(DirectoryEntry webSite,
int order, View listBoxView)

{

    Record newListBoxRecord;

 

    newListBoxRecord = new Record(4);

    newListBoxRecord[1] = "WEBSITE";

    newListBoxRecord[2] = order;

    newListBoxRecord[3] = webSite.Name;

    newListBoxRecord[4] = webSite.Properties["ServerComment"].Value;

    listBoxView.Modify(ViewModifyMode.InsertTemporary, newListBoxRecord);

}

 

Now I've referenced WEBSITE data from UI:

<Control Id="SelectWebSiteCombo" Type="ListBox" X="20" Y="75" Width="200"
Height="100" Property="WEBSITE" Sorted="yes" />

 

 

During build I receive the following warning: ICE17: ListBox: 'WEBSITE' for
Control: 'SelectWebSiteCombo' of Dialog: 'SelectWebAddressDlg' not found in
ListBox table.

 

Are there way to specify that WEBSITE ListBox data will be filled
dynamically during runtime? I mean something like EnsureTable.

 

Thanks

 

----------------------------------------------------------

Best Regards,

Oleksandr Y. Nechyporenko

 

 

 

 

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to