You have to do this with a custom action. I've done this in C++, I am
sure it's a little easier with DTF (C#). 

Get the database via MsiGetActiveDatabase()

MsiDatabaseOpenView of SELECT * FROM ComboBox` WHERE
`Property`='PROPERTY_ATTACHED_TO_COMBOBOX'

For each record you want to insert do something like this:

        // the first record is inserted at index 2, there's at least one
default item in the view
        MsiHandle hRec(MsiCreateRecord(4));
        CHECK_WIN32_DWORD(MsiRecordSetString(hRec, 1, listbox.c_str()),
                        L"MsiRecordSetString(1) failed"); // Column1:
Property tied to the entry
        CHECK_WIN32_DWORD(MsiRecordSetInteger(hRec, 2, insert_index),
                        "MsiRecordSetInteger(2) failed"); // Column2:
Display order of the item
        CHECK_WIN32_DWORD(MsiRecordSetString(hRec, 3, name.c_str()),
                        "MsiRecordSetString(3) failed"); //Column3:
Value to set property to
        CHECK_WIN32_DWORD(MsiRecordSetString(hRec, 4, name.c_str()),
                        L"MsiRecordSetString(4) failed"); //Column4:
Display text for item
        CHECK_WIN32_DWORD(MsiViewModify(msiView,
MSIMODIFY_INSERT_TEMPORARY, hRec),
                        "MsiViewModify failed");
        
                insert_index ++; 

I've attached our code that uses DMO to populate a dropdown of SQL
servers.

Hope this helps.

Cheers
dB.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of pavan
gadam
Sent: Monday, August 25, 2008 4:51 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Dynamically Populate ComboBox.

Hi,

I have ComboBox declared as below.

<Control Type="ComboBox" Width="75" Height="16" X="100" Y="50"
Id="MyCombo"
Property ="ComboProp">

<ComboBox Property ="ComboProp">

</ComboBox>

</Control>
Values need to be get populated based on the code that is written C#
Custom
Action method.

How can this be achieved?

Thanks,
Pavan
------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to