ComboBox and Dynamic Items

R

Raghu

I am working on an MSI file that has dialog which contains combo box. I need
to populate the combobox with items based on the user system and let user
choose one of the items. The development and target OS is win2k server
(windows installer 2.0).

The dialgo and control are linked in Control table along with set property.
The property and its items (that are set at design time) are listed in
ComboBox table. But I don't know how to populate combobox with dynamic items
at runtime depending on the user system.

Any help is appreciated.

Thanks.
Raghu/..
 
K

Kallely Sajan

It will be something like the following

dim ODB: set ODB = Session.Database
dim oInstaller: set oInstaller = Session.Installer
Set view = ODB.OpenView("Select * From `ComboBox`")
view.Execute

Set mrecord = oInstaller.CreateRecord(4)
Const MSIMODIFY_INSERT_TEMPORARY = 7
dim i : i = 0
i = i + 1
With mrecord
.StringData(1) = "COMBOLIST"
.IntegerData(2) = i
.StringData(3) = "something"
.StringData(4) = "something else"
End With
view.Modify MSIMODIFY_INSERT_TEMPORARY , mrecord

For more info pls refer to
http://msdn.microsoft.com/library/en-us/msi/setup/combobox_table.asp
--

Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.
 
R

Raghu

I will try this. Thank you.

Kallely Sajan said:
It will be something like the following

dim ODB: set ODB = Session.Database
dim oInstaller: set oInstaller = Session.Installer
Set view = ODB.OpenView("Select * From `ComboBox`")
view.Execute

Set mrecord = oInstaller.CreateRecord(4)
Const MSIMODIFY_INSERT_TEMPORARY = 7
dim i : i = 0
i = i + 1
With mrecord
.StringData(1) = "COMBOLIST"
.IntegerData(2) = i
.StringData(3) = "something"
.StringData(4) = "something else"
End With
view.Modify MSIMODIFY_INSERT_TEMPORARY , mrecord

For more info pls refer to
http://msdn.microsoft.com/library/en-us/msi/setup/combobox_table.asp
--

Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top