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!

ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

What initiates Published Events

I have a new Dialogue where there is a combo box that sets a value of variable1 "Choice1" to an A or B
Depending on the user selection at install time on this dialogue, there are two Published Events that then set the value of
a second variable2 "Choice2" to either a 1 or a 2 depending on the value of Choice1.

Here is the problem: during install time, if the user is happy with the default setting of the combo box, then they
will leave it alone and it is not changed. The value of "Choice1" is stored in variable1 but the Published Events are
not initiated and the value of variable2 is not changed accordingly.

Is there a way to get the installer to initiate/act on the Published Events even if the combo box is not changed?

Best regards,

Ian
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: What initiates Published Events

Hello,

The published events are executed when the user interacts with the control. If the user doesn't click on the combobox, they will not be executed.

You should place a new "Init event" on the dialog, configured to "Set installer property value". In the property field enter "CHOICE2" and in the argument enter "1". In this way, the CHOICE2 will be initialized when the dialog is shown. The init events are executed only when the dialog is displayed. Please take a look on our article : Events Editor

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: What initiates Published Events

Thanks Sorin,

I tried copying the Events over to the Published Events that are part of the 'Next Button'.
I'm testing just now and it seems to work ok however I will test further to be sure.

Thanks for your help in clearing this up.

Ian
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: What initiates Published Events

Hello Ian,

You are welcome! Please let me know if you have any other questions!

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: What initiates Published Events

Hi Sorin,

In the later stages of the install, the value is used to populate web.config files and is then stored in the registry for use if the application is uninstalled and reinstalled (new version).

The change didn't work - right at the end of the install, the registry was updated with the wrong value but the config files were updated correctly.
I've tried several Event configurations without success. :(

It seems to change the registry value right at the end of the install process.

Ian
ipollock
Posts: 137
Joined: Wed Aug 31, 2016 10:46 am

Re: What initiates Published Events

Just to rule out the obvious, when setting up the event I am doing this:

Event Argument Condition
Choice1 A Choice2="1"
Choice1 B Choice2="2"

As opposed to:
Choice2 1 Choice1="A"
Choice2 2 Choice1="B"
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: What initiates Published Events

Hello,

We have tested your scenario but couldn't reproduce your issue.
Please note that the recommended approach for storing Installer properties into the registry in order to use them on maintenance or uninstal is setting these properties as "Persistent". Please have a look on this article : How do I make the properties in the package keep their values during Maintenance or Upgrade?

To enable "Persistent" option to CHOICE1 and CHOICE2 properties, please go to "Install Parameters" and click "Show properties with empty value or used in dialogs controls". CHOICE1 and CHOICE2 will be displayed. Double click on each one of them and check "Set persistent property" value.

If this doesn't help, please send us the .AIP (project) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them. Also please specify the name of the properties that are not set correctly in the registry.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: What initiates Published Events

Hello,

In completion to my previous post, please make sure that you are using public properties. Public properties are written in all uppercase. Only these properties preserve their value throughout the install process. Please take a look on this article :Windows Installer Properties

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”