Setting a default value to Custom Behaviour->Search - Advanced Installer Community

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!

Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Setting a default value to Custom Behaviour->Search

Using AI 7.7:
I want to look for some Registry value and store it in a Property to use later.
Using "Custom Behaviour"->"Search" this can easily be achieved (which is great).
However, what if the Registry value doesn't exist? Then in this case the Property is NULL or "".
This is not what I want, I want to have a default value, so if the registry value exists, then I'll have it, but if it doesn't exist, then I can have a default value set for this Property.

How can this be done?
Thanks, Dashut.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Setting a default value to Custom Behaviour->Search

Hi,

You can try using a Property set with formatted custom action to set the property to a default value if it's empty. This custom action should be scheduled after "InstallUISequence" -> "AppSearch" and "InstallExecuteSequence" -> "AppSearch".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Setting a default value to Custom Behaviour->Search

Works as expected, thanks.
Dashut.

Return to “Common Problems”