Hi,
I followed the steps given below and it worked, but I need a VB Script to put the value I entered in that session of the installation and put it in to the json file. Can you please help with this
In order to achieve what you want you can use our "ExtractComboBoxData" predefined custom action to extract all combo box items (extracted in "AI_COMBOBOX_DATA" property). Then, you can create your own custom action wich will parse the "AI_COMBOBOX_DATA" property content and will extract selected item text and value. Also, please keep in mind that a combo box property is always set with its selected item value.
Here are the steps to proceed:
- Go to "Dialogs" page and add your combo box control (e.g. COMBO_PROP).
- Go to "Custom Actions" page and add our "Extract combo box data" custom action without sequence.
- Add a "Launch attached file" custom action without sequence (e.g. ExtractSelectedItem) using a VBS file like this:
CODE: SELECT ALL
Dim comboBox
Dim selectedItemValue, selectedItemText
comboBox = Session.Property("AI_COMBOBOX_DATA")
selectedItemValue = Session.Property("COMBO_PROP")
itemsArray = Split(comboBox, "|", -1)
For Each item In itemsArray
tempItem=Split(item,"#")
If (tempItem(0) = selectedItemValue) Then
selectedItemText = tempItem(1)
End if
Next
Session.Property("COMBO_VALUE") = selectedItemValue
Session.Property("COMBO_TEXT") = selectedItemText
which will save the selected item value and text in two installer properties (COMBO_VALUE and COMBO_TEXT).
- Go to "Dialogs" page and on [Next>] button (of your combo box dialog) add the following published events:
Event: [AI_COMBOBOX_DATA]
Argument: COMBO_PROP
Event: Execute custom action
Argument: ExtractComboBoxData
Event: Execute custom action
Argument: ExtractSelectedItem
- Build and run your project.
FOLLOW US
Get the latest news in Application Packaging