juan.01
Posts: 18
Joined: Thu Nov 03, 2022 7:35 am

Refresh dependant properties on property change

Hi,

I have added some custom properties in my installer.
  • HOME_PATH = C:\Home
  • CONFIG_PATH = [|HOME_PATH]\Configuration
  • LOGS_PATH = [|HOME_PATH]\Logs
I have noticed that If during wizard I change HOME_PATH the others properties are not being refreshed. The only way to achieve that is using custom actions and putting them before path resolution execution stage.

This is the correct way or there is another way to refresh dependant properties?

With regards,
Liviu
Posts: 1273
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Refresh dependant properties on property change

Hello,

Most likely, this happens because you are using a PseudoFormatted property, which is resolved at build time.

By default, properties referenced by PseudoFormatted ("[|propertyname]") field are resolved at build time. During installation only properties used in Formatted data fields are resolved.

During the installation you need to use only properties referenced by Formatted data types, for example "[HOME_PATH]".

More details on our Windows Installer Formatted Type article.

Hope this helps! If you have any other questions, please don’t hesitate to contact us.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
juan.01
Posts: 18
Joined: Thu Nov 03, 2022 7:35 am

Re: Refresh dependant properties on property change

Liviu wrote: During the installation you need to use only properties referenced by Formatted data types, for example "[HOME_PATH]".
Hi! Thanks for your reply. Maybe you mean to set properties like this way?
advinst_spBv7TKVJc.png
advinst_spBv7TKVJc.png (3 KiB) Viewed 6333 times
I have try also in this way and it seems that the property inside '[]' are not replaced with value at runtime. I have used that properties in XML configuration files and it just simply puts '[ROOT_PATH]\Configuration'

I supuse that the only way is using custom actions?

With regards,
Liviu
Posts: 1273
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Refresh dependant properties on property change

Hello,
I have try also in this way and it seems that the property inside '[]' are not replaced with value at runtime. I have used that properties in XML configuration files and it just simply puts '[ROOT_PATH]\Configuration'
This happens because the value field of a property does not support Formatted data types properties.

To update the property in this way, you will need a Set installer property custom action.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
juan.01
Posts: 18
Joined: Thu Nov 03, 2022 7:35 am

Re: Refresh dependant properties on property change

Thanks for your help! This is what I have done. What is the recommended stage to put this type of actions?

With regards,
Liviu
Posts: 1273
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Refresh dependant properties on property change

Hello,

You can add these custom actions before the Path Resolution standard action under the Wizard Dialogs Stage in the Custom Actions page.

Let us know if you have any other questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”