Hello,
If the DeleteFromListBox event is not used, then in some cases when the AI_LISTBOX_DATA property is set a second time, the new value may be appended to (concatenated with) the old value from the first list, instead of replacing it.
To avoid this and ensure the property is always updated correctly, we clear it before setting it again. The correct sequence is:
1. Set the AI_LISTBOX_DATA property with the first value.
2. Clear (remove) the value of the AI_LISTBOX_DATA property.
3. Set the AI_LISTBOX_DATA property again with the new list.
I also found a workaround that allows us to use a single script by using a custom property. Here’s how you can do it:
1. Create a new property in the Properties page.
2. In your script, when handling the second list, instead of setting the AI_LISTBOX_DATA property directly, set the custom property you just created. (For example, I named mine TEST.)
Code: Select all
$aiListboxData = "RUNNING_SERVICES_LIST" + "|" + $service
$LB2 = "LB2|val4|val5"
AI_SetMsiProperty AI_LISTBOX_DATA $aiListboxData
AI_SetMsiProperty TEST $LB2
3. On your dialog, instead of adding a second script, use a Set installer property action to assign the value of the TEST property to AI_LISTBOX_DATA:

- init events.png (69.98 KiB) Viewed 66 times
Let me know if that helped.
Best regards,
Liviu