Kiran Shahi
Kiran Shahi

Reputation: 7970

How to get the selected ComboBox value in wix toolset?

I have used WIXUI_INSTALLDIR template to bundle the installer. Here I have a custom form between welcome dialog and license dialog which consist of three ListItems inside Combobox.

enter image description here

I tried to access the dropdown value with bind.property.SK_Version. For example, <Directory Id='INSTALLDIR' Name="!(bind.property.SK_Version)">. However it always return the value of first item in the list. Can you suggest me the best way to get selected value from combobox in wix toolset.

enter image description here

Upvotes: 0

Views: 375

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55601

Bind variables are a build time concept. At runtime, MSI uses Properties. There is a property associated with your combobox and each selection has a value and a display text. The value gets assigned to the property. From there you need to use a Set Property custom action to build your INSTALLLOCATION property based on the value of that property.

https://learn.microsoft.com/en-us/windows/win32/msi/combobox-table

Upvotes: 0

Related Questions