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.
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?
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.
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.
FOLLOW US
Get the latest news in Application Packaging