PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Multiple Instances - Install Parameters per Instance?

I'm testing an installer I built that supports installing multiple instances of my application.

I am using persistent properties so that the install parameters the user fills out during install are persisted to the registry.

However, the install parameters are being persisted to HKLM\Software\Wow6432Node\CompanyName\{UpgradeCode}

This is obviously problematic as every time the installer is run for a new instance, the values entered for the previous installer are populated by default.

If I install Instance #0 and then Instance #1 and then try to upgrade Instance #0, the install parameters are the Instance #0 ones.

I expected the persistent install parameters to be saved to the registry under HKLM\Software\Wow642Node\CompanyName\ProductNameInstanceNumber. That is where the path to that instance's install and that instance's version is persisted.

Please help me understand what I'm doing wrong. As I've described above, persistent properties are useless for multiple instances.

I'm considering switching off persistent properties and using a whole bunch of custom actions to add registry keys like InstallParameter1Instance0, InstallParameter1Instance1 that I then read in at the beginning and use based on the instance id, but that will be clunky and a ton of work.

I looked into Instance Properties, but that seemed like a dead end as they are not put into the registy.

Any other options? Or is this type of functionality just not supported?
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: Multiple Instances - Install Parameters per Instance?

Another alternative I thought of was to switch the installer to installation type "per-user only". That puts the registry keys in the HKCU hive.

At that point, I'd remove the Multiple Instance support that is built into Advanced Installer and instead only support multiple instances of the application if each "instance" is installed by a different user.

And I'd have to manually manage making sure the service names, websites, etc. didn't have naming collisions.

Not what I'd prefer, but again, looking for any options
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Multiple Instances - Install Parameters per Instance?

Hi Peter,

Indeed, we missed our multiple instance packages when the support for persistent properties was included. We'll analyze this and update it in a future version, thank you
for bringing it to our attention.

A solution for you, without switching to per user installs, is to disable the persistent property support from Install Parameters page and implement it manually, NO custom actions are required.
All you need to do is to create the registry key you mentioned above and save the property value in it, by adding the property between square parentheses in "Data" field of your registry value.
To retrieve the properties you need to define searches, that use as names exactly the property name. Configure the searches to look for your registry value created.

This search will automatically set the property if it finds it in the registry. This is basically what we were doing too, but only that you had a simple checkbox to tick, now you need to do it manually.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: Multiple Instances - Install Parameters per Instance?

Thanks for the response and the suggestion of a work around. Definitely would be a nice feature to work by default.

Return to “Building Installers”