Write a value in INI file based on dialog checkbox - 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!

lberezinski
Posts: 2
Joined: Thu Nov 03, 2011 10:56 pm

Write a value in INI file based on dialog checkbox

Hello all,

I am new to advanced installer and i'm trying to build the application INI file based on a custom dialog (attached screenshot)

how would i setup my project for it to set "1" or "0" in my INI file based on the custom dialog?

thanks in advance
Attachments
Untitled.png
Untitled.png (47.34 KiB) Viewed 1805 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Write a value in INI file based on dialog checkbox

Hi,

I suppose you are referring to the options available for selection using checkboxes. By default Windows Installer sets the property attached
to and UI element, i.e. a checkbox, to the value you specify in the files "Value" from Properties pane, in Dialogs page.

If the checkbox is not ticked, than the property is not set, i.e. it contains an empty string. So you can define for example "1" as value for the public property attached
to the checkbox, and if it is ticked it will pass "1" to the INI file, otherwise and empty string.

If you want to pass "0" when it is not selected than you need to add a "SetProperty" published event on the "Next" button of the above dialog that sets the property attached to the checkbox to value "0" only if the property is empty, i.e. execution condition is: NOT Installed AND NOT MY_PROP

To set the properties in the INI file you can use our built-in editor, similar as the one used for XML files.
http://www.advancedinstaller.com/user-g ... ialog.html
http://www.advancedinstaller.com/user-g ... -file.html

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”