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

Insert Registry Entry in Text Field - Default Value

If I set a property to collect a registry value and populate a text field at install time, how do we set a default if that registry setting does not exist yet?

For example: Installer runs, checks registry but no key exists, it cannot leave the box empty so we need a default if this happens.

Best regards,

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

Re: Insert Registry Entry in Text Field - Default Value

So the example should be like this:

I install my new application and it puts in several registry entries - my dialog boxes have defaults in and these are replaced by the user (eg default would be server_name).

The user uninstalls the application and I have set the registry entries to be permanent so they are left behind.

The user decides to install the application again, this time picking up the registry entries that were left behind (remembered).
So I realy need to have some kind of condition somewhere that says 'if a registry entry exists then use it, if not then use the default of 'server_name'.
Is this possible?

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

Re: Insert Registry Entry in Text Field - Default Value

OK so I was 'over-thinking' this one.

It appears that the install will pick up the registry entries on install if they are there and previously marked permanent.
I tested this by removing the relevant application registry tree before installing, then installing followed by reinstalling.

Thus as long as your registry entries are marked as permanent in the 'Organisation' view and they are inserted into the
'Install Paramaters' properties table and you have put in a search for each, you can leave the standard default in the fields
and they will be restored during the reinstall.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Insert Registry Entry in Text Field - Default Value

Hi Ian,

If you create that property in the "Install Parameter" page and set a default value for it, that value will be use if the searched registry entry is not found.

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

Return to “Building Installers”