Checkboxes And Persistent Properties - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Checkboxes And Persistent Properties

If I want to bind a checkbox in my UI to a persistent property it seems like AI doesn't make that easy. Basically because in the "Install Parameters" tab, "Properties" panel (where properties can be easily persisted) requires that a non-null default value be entered which would cause the "bound" checkbox in the UI to be selected.

I see the choices being:

1) add the persisted property in the UI, give it a default of "none" (for example), write a custom action that sets it to "{}" before the wizards display (but I think the {} causes the property to be deleted which would kill the persisted property?)

2) only define the property on the checkbox and write a custom action to persist it to the registry myself

Did I miss something?

Scott
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Checkboxes And Persistent Properties

Hello Scott,
1) add the persisted property in the UI, give it a default of "none" (for example), write a custom action that sets it to "{}" before the wizards display (but I think the {} causes the property to be deleted which would kill the persisted property?)
In order to achieve this you can enable the "Set persistent property" option in "Install Parameters" page. Then you can add a "Set installer property" custom action (as you mentioned) which will run only on install. In this way the property value will not be reset on maintenance mode.
2) only define the property on the checkbox and write a custom action to persist it to the registry myself
Yes, this is a valid approach too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Checkboxes And Persistent Properties

So using the method in Option #1 (i.e. Set Installer Property = {}) which deletes the property, Advanced Installer will still remember it's set as "persistent" when that property is created again by Windows Installer??
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Checkboxes And Persistent Properties

Hello,

Yes, if you will set the related custom action to run only on install, then the related property value will be preserved through the maintenance mode.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”