cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
knoepdan
Level 6

Preselect dynamically filled item in combobox

Hi

In my basic msi project i have a standard dialog with a combobox. I fill this combobox dynamically ( example on how to do it in thread: http://community.acresso.com/showthread.php?t=188501 ) and now i would like to preselect the combobox but i am a bit at loss on how to do it. CtrlSetCurSel does not work as it is not a custom dialog.

I prefer to have a solution in installScript or if not possible visual basic. (unfortunately, C# wont work for this) I am sure i need to set some property in the msi database, but which one and how do i access it properly

Thanks for your help in advance.

Greetings
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Perhaps set the list box or combo box property (LISTBOXPROP or whatever) to the value (not the display name) you want to be selected.

In InstallScript, MsiSetProperty(hInstall, "LISTBOXPROP", "WhateverDefault"), in VBScript Property("LISTBOXPROP")="Default", etc.

As an aside, this old newsletter tip says a bit more about the subject (PDF warning): http://www.acresso.com/webdocuments/PDF/msiaccess.pdf.
0 Kudos
knoepdan
Level 6

Hi

Thanks for your answer. The solution is as you suggested. I just need to set the Property of the Combobox to a value that equals the value (not the display text) of one of the Combobox items. i should have come up with that myself (actually i did but a silly spelling mistake cause my try to fail)

Thanks for your help.

Greetings
0 Kudos