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

Recommended approach for in-place upgrades

Let's say I have my product, and version 1.0.0 installs a Windows Service, plus an App Pool and Web Site in IIS.

The login user for the Windows Service and the App Pool are specified by the user through Dialogs as Install Parameters during the initial install.

Now I have version 1.1.0 ready. The only change in 1.1.0 is a DLL file was upgraded.

If I just go in and update the DLL under Files and Folders in Advanced Installer and then update the version (to get a new Product Code) and rebuild the installer, I now have an installer I can run and it will remove 1.0.0 and put 1.1.0 in its place.

The problem is I then have to prompt the user for the Install Parameters again to get the login user to install the Service again and setup the App Pool.

Alternatively, I can hide that Dialog in the upgrade install by using the OLDPRODUCTS condition, but then the default value for the parameter is used instead, overwriting what the user specified previously.

Neither one of those is great options.

Other options I can think of are to use a Patch instead, in which case I CANNOT use Synchronized Folders right? But if I used a Patch it would only update the changed files right?

Another issue with using a Patch would be if I had a config file which had 3 keys set by the user's input on initial install. Then for the next version, I added a new value; now I'd want to update that config file in place with new user input, but not disturb the old values.

Or am I thinking about this the wrong way? I've found generally I can do a lot with Advanced Installer, I just often have to figure out how it wants me to do something.
PeterM
Posts: 19
Joined: Fri Mar 29, 2013 9:28 pm

Re: Recommended approach for in-place upgrades

After some failed experiments with patches, at least part of the answer appears to be using Persistent Properties for the Install Parameters so the values are persisted in the registry for maintenance upgrade installs.

http://www.advancedinstaller.com/user-g ... rties.html
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Recommended approach for in-place upgrades

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
The problem is I then have to prompt the user for the Install Parameters again to get the login user to install the Service again and setup the App Pool.

Alternatively, I can hide that Dialog in the upgrade install by using the OLDPRODUCTS condition, but then the default value for the parameter is used instead, overwriting what the user specified previously.

Neither one of those is great options.
Indeed, in order to achieve what you want you can use our property persistence support.
Other options I can think of are to use a Patch instead, in which case I CANNOT use Synchronized Folders right?
Please keep in mind that it is not recommended to use synchronized folders when creating patches. However, you can create a patch with synchronized folders, but this requires an increased attention when creating patch. Please take a look on our "How to create and maintain Patch Installers" thread which debates a similar issue.
But if I used a Patch it would only update the changed files right?
Yes, this is correct.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”