Hello Bernd,
Let me try to explain how you can achieve this. First of all, a checkbox state is saved (stored) into a public property. If you add a checkbox on any of your dialogs and then press on it, on the right pane, under "Property" --> in the "Property name" field, you can see the property name. By default, a checkbox porperty name looks something like this:
CHECKBOX_1_PROP, but you can change its name.
The checkbox can have two states:
- checked --> if the checkbox is checked, the value of its property is "CheckBox".
- not checked --> if the checkbox is not checked, the value of its property is "".
Now, let me try to explain how you can achieve what you want through an example:
- let's say you created a property in "Install Parameters" page having its name
MY_PROP and its value of 1 (no quotes).
- after that, you added a checkbox on the "WelcomeDlg" having its property
CHECKBOX_1_PROP
- and now, through the state of the checkbox, we want to set our earlier created property. To do so, please go on the dialog where the checkbox is located (in our example "WelcomeDlg"), click on the "Next" button and under "Published Events" tab, press the "New..." button to create an event as it follows:
(Set installer property)
- Property: MY_PROP
- Argument: 1
- Condition: press the "..." button and insert the following condition:
CHECKBOX_1_PROP = "CheckBox"
Now that we have create the event that sets the property to "1" (without quotes) when the checkbox is checked, its time to set the property to "0" in case the checkbox is not checked. To do so, please repeat the step above to create a new event under the "Published Events" tab like as follows:
(Set installer property)
- Property: MY_PROP
- Argument: 0
- Condition: press the "..." button and insert the following condition:
CHECKBOX_1_PROP = ""
This way, the property value will be set through the checkbox state.
Also, attached you can find a sample .AIP file which implements those said above, for your reference. I have also displayed a message box which shows the property value, so you can see that the property value is changing.
Hope this helps.
All the best,
Catalin