fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Custom Installer Property and XML config

I am using AI 11.5.1

I created an installer property called "Server_Protocol" with a default value of "http".

On a dialog screen, I created a checkbox "use https" and created a published set property action on the Next button to set Server_Protocol to either http or https, based on checkbox status.

I added a label to the Review screen to confirm that the Server_Protocol property is getting set by published.

In Files, I have an XML file that modifes a suppled .NET config file element like this: [Server_Protocol]://[LOBBYCENTRAL_SERVER]/servicecenterweb

When the installer completes, the config file always ends up with http in place of Server_Protocol, even though the Review screen shows that the property has been set to https.
ai_2.png
ai_2.png (20.5 KiB) Viewed 9045 times
ai_1.png
ai_1.png (22.12 KiB) Viewed 9045 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Installer Property and XML config

Hello,

Can you please remove the equal part and see if the behaviour still persists? Just use the following condition for the Set Installer Property Value:
  • setting the SERVER_PROTOCOL property with https argument when AI_INSTALL AND USE_HTTPS
  • setting the SERVER_PROTOCOL property with http argument when AI_INSTALL AND ( NOT USE_HTTPS )
Note that when a checkbox is checked, the property assigned to the related control is set. If the checkbox is not checked, the property assigned to the related control is not set.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Re: Custom Installer Property and XML config

Hi Dan,

Unfortunately that did not work.

I have verified that the property is getting set by adding a label to the Ready Dialog and setting the Text property of the label to Server_Protocol.
ai_3.png
ai_3.png (29.52 KiB) Viewed 9041 times
ai_4.png
ai_4.png (31.95 KiB) Viewed 9041 times

Any other ideas or maybe a work around?
fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Re: Custom Installer Property and XML config

Any recommendations or work-around for this issue?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Installer Property and XML config

Hello,

First of all I apologize for my delay reply.

I'm not sure why you encountered the this behavior.
In order to have a better view about this, can you please send us the .AIP (project file) and a verbose log of the installation process to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Re: Custom Installer Property and XML config

No problem. I'll send over the project file.

Thanks!
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Custom Installer Property and XML config

Hi,

I don't know whether this helps at all: -

The values when a check box is used are "True" and "False" ( See enabled) values under attributes.
So just set the property to http or https based on these values i.e. = "True" or = "False".

Also do you really mean your variable to be private? If you want to use it later or in the msiexec command line it must be public so make it capital letters. See the following link for an explanation of public v private: -
http://www.advancedinstaller.com/user-g ... rties.html

Bear in mind I do not work for AI (Caphyon) I am a customer.

Regards,
John
fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Re: Custom Installer Property and XML config

jusher wrote:Hi,

I don't know whether this helps at all: -

The values when a check box is used are "True" and "False" ( See enabled) values under attributes.
So just set the property to http or https based on these values i.e. = "True" or = "False".

Also do you really mean your variable to be private? If you want to use it later or in the msiexec command line it must be public so make it capital letters. See the following link for an explanation of public v private: -
http://www.advancedinstaller.com/user-g ... rties.html

Bear in mind I do not work for AI (Caphyon) I am a customer.

Regards,
John

The property "Server_Protocol" is getting set, so it's not an issue with the conditional logic on the Next button. I can verify this on the last screen of the dialog where I am outputting the property.

But, I wasn't aware that the case of the property indicated anything. So I'll try it in all caps and see if that makes a difference.

Thanks!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Installer Property and XML config

Hi,

@John: Thank you for your help.

Indeed, this is the problem. You are using a private property. Please note that Windows Installer properties are global variables that Windows Installer uses during an installation.
There are two main types of Windows Installer properties:
  • Private Properties (contain lower-case letters in their name, example: My_Prop)
  • Public Properties (contain only upper-case letters in their name, example: MY_PROP)
The difference between Public and Private properties consists in the way their values are being passed on. Only the value of a Public Property is passed on from the Wizard Dialogs Stage (in which the dialogs are showed) to the Install Execution Stage (in which the system is modified).

Therefore, make sure that you use a Public Property for an UI control (Editbox, Combobox etc) if you want its value to be available in the InstallExecute Sequence (for instance, if the value of this Property is written in the registry, .ini file), otherwise you will get the default value assigned to this property.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fuhrj
Posts: 13
Joined: Fri Jul 25, 2014 6:44 pm

Re: Custom Installer Property and XML config

I've confirmed that this is now working by setting the property in all caps.

Thanks for your help!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Installer Property and XML config

You're welcome,

I'm glad you got this working.
If you have any questions we'll be glad to answer them.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”