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!

MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Check box value not saving to XML file

Hi,

I have an installer where I am saving some SQL parameters. One of the parameters is if the connection is trusted or not.
(TrustedConnection)

The value is based on a check box in the SQLServerConnection dialog.

I would like either "true" or "false" ( boolean value ) to be stored in the XML file, but the project is not doing that.
AI_SQL_TrustedConnectionNoValue.PNG
AI_SQL_TrustedConnectionNoValue.PNG (7.15 KiB) Viewed 2238 times
I have attached the project for your inspection.

Thanks
Mike
Attachments
ManagerServiceInstaller.zip
(494.71 KiB) Downloaded 250 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Check box value not saving to XML file

Hi Mike,

The property related to the checkbox is empty when the checkbox is not checked. When you check it, the property's value is set to the value specified in the "Value" field.

In order to populate the "<TrustedConnection>" XML element when the check box is not checked you can use a different public property which is set depending on the state of the checkbox.

To achieve this you can follow the steps below:
- in "Install Parameters" page, create a property (i.e. "TRUSTED_CONNECTION") with the default value set to "True"
- using a "Set installer property" custom action with sequence in "Install Execution Stage" after the "Searches" action group, you set the property created above ("TRUSTED_CONNECTION") to the "False" value if "DB_TRUSTEDCONNECTION" property is not set (condition is: "NOT DB_TRUSTEDCONNECTION").
- use the "TRUSTED_CONNECTION" in your XML file to update the "<TrustedConnection>" element

This way, the "<TrustedConnection>" XML element will always have a value.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”