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!

SchlechtesWetter
Posts: 1
Joined: Thu Jan 16, 2020 9:05 am

Set public property to private property at runtime

Hello everyone,

I have two properties, lets call them MY_PROP_PUBLIC and my_prop_private.
The public property has a value, which I would like to use as a default value.
Now the user should be able to change the public property during installation (MSIEXEC/Silent only. I have no GUI Installation.)
I want to define the private property with the value of the public one.
Like:

Properties
Name: MY_PROP_PUBLIC - Value: defaultValue
Name: my_prop_private - Value: testvalue [MY_PROP_PUBLIC]

I would like to be able to set the MY_PROP_PUBLIC property via parameter on a silent installation and if I set it, i want the my_prop_private property to use the new value instead of the already set one.

Example:

Code: Select all

msiexec.exe /i "C:\Example.msi" /qn MY_PROP_PUBLIC="JohnDoe"
Now I want my_prop_private to have the value: testvalue JohnDoe

Is that possible? Because when setting new properties in Advanced Installer Install Parameters, I always get [|MYP_PROP_PUBLIC], so a PseudoFormatted Property. But as far as I know, I need a property without a pipe| to be able to set it during installation.

Greetings
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Set public property to private property at runtime

Hi and welcome to our forums.

Yes, you can achieve this by adding a "Set installer property" custom action before the "Install Execution Stage -> Searches" action group from the "Custom Actions" page. You can configure it as in the example below:
  • Property: my_prop_private
    Value: [my_prop_private] [MY_PROP_PUBLIC]
Let me know if this helped, otherwise give me more details about your scenario.

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

Return to “Common Problems”