ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Install extra files over an existing application

I have read "How to install some files in a folder of a previously installed application?" but when I build this installer with the extra files and run it, I get the error that a previous version of the program already exists and needs to be uninstalled before this new version can be installed. In addition to the steps mentioned in the "How to install some files in a folder of a previously installed application?" article I have checked the box to "Allow side by site installes" in the Upgrades section but that did not help.

I'm sure that there is a check box somewhere that I am not checking but I don't know which one it is. Can someone point the way?

Ed
Last edited by ehardin on Mon Mar 09, 2020 10:50 pm, edited 1 time in total.
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Install extra files over an existing application

I have gotten it to where it runs without warnings but it install only the extra files and deletes all of the previous files. All I want to do is install the extra file and leave the original install alone.

The article "How to install some files in a folder of a previously installed application?" seems to indicate that this is possible but apparently leaves out vital steps. Do I make a copy of the original install package and then delete all of the original files and then create the search etc...this is what I have done...or do I start from scratch and create a new install package? If so, how do I tell it to now install over the existing application?

Let's say the application is already installed. I now want to send an install package to users that contain extra files for them to add to an existing directory in the applications directory. How do I do this without wiping out the original application?
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Install extra files over an existing application

Hello Ed,

First of all, please accept my apologies for the delayed reply.

In what regards your questions, let's start this with some explanations:

First of all, we must know that there are two types of an update:

1. a major upgrade

2. a patch

What is a major upgrade?

A major upgrade is essentially the removal of an older product which is replaced by a newer product.

What is a patch?

A patch package is an MSP file containing usually only the changes between the previous and the updated version.

Let's take your case here, as an example:

You have an installation. Let's say it installs one file: a.txt. After that, you want to deploy a new version that also contains another file: b.txt.

Let's consider our two options:

1. A major upgrade would first remove the first version installed and then install the newer version. The major benefit of a major upgrade is the fact that it can be installed as a standalone installation. However, here comes the question: Do we really need this in our case? I believe the answer to this is no.

Also, a major disadvantage of the major upgrade is its size.

2. A patch. Here, a patch would contain only the differences between the first version of your package and the updated version --> this means it will only contain the b.txt file, which will be added to a currently installed applicaiton.

A major advantage of the patch is the fact that its size is much smaller compared to the one of a major upgrade. However, a disadvantage is the fact that it can not be installed alone, it requires the previous version to already be installed, pretty much what you would like to achieve (please correct me if I'm wrong).

As you may already know, the MSI file is basically a database file. The patch is created by taking two MSI files and comparing them. The differences between those two are then saved into another MSI. When installed, a patch will detect the previous version and then basically joining the tables of the two databases.

A little example: let's consider we have v1.0 and v2.0 of our application. From these two, we create v.Patch patch file.

We install v1.0 on the machine. We then apply v.Path file to our currently v1.0 and we will obtain v2.0.

Let's go a bit further with the explanation and discuss UpgradeCode and ProductCode properties:

The UpgradeCode is a GUID representing a related set of products. A set of different versions of your application will have the same UpgradeCode. This enables newer versions of your application to search and upgrade previous versions installed on the same computer.

The ProductCode property is a unique GUID used to identify your application. This identifier varies from version to version of the same installer.

One major differences between a patch and a major upgrade is the fact that:

- a patch must have the same ProductCode as the previously installed version. As I have highlighted above, the ProductCode is used to identify your applicaiton. The patch must be able to identify which database to attach to, therefore the ProductCode must be the same

- a major upgrade must have different ProductCode. It is important to note that two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error reading:
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Programs and Features in the Control Panel.
Now, coming back to your scenario. I believe that in your case, a patch would be better compared to a major upgrade.

For more information about creating a patch, please have a look on our "Creating Patches" article.

Hope this help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Install extra files over an existing application

Catalin,

Thank you for the reply. The "How to install some files in a folder of a previously installed application?" article was a little misleading then. It never mentioned that you needed to do a patch.

I used to do Patches to my application but, with hundreds of files, something always eventually went wrong and the Patch would not compile. I finally just decided that, for my convenience and that of my customers, I would just do Updates. That went fine until I hit a size limit. My application contains a lot of videos and, as such, it ends up being large. I keep my app as a 32bit app because a lot of my customers run my app as a stand-alone app on old laptops that tend to be 32bit and I don't want to maintain 2 different installs. Well, with my latest videos I hit the 2GB limit of 32bit install packages and was looking for a way of just installing the new videos. The article mentioned above gave me hope that there was a way with AI but apparently there is not. While waiting to hear from anyone who has tried this with AI I have been working on my own method of doing this and am just about finished with that.

It would have been nice for AI to have had a solution but thanks for the explanation.

Ed
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Install extra files over an existing application

Hello Ed,

You are alwyas welcome!

In addition to what I've mentioned above, you can maybe try to perform an upgrade but do not remove the already existing files. Please have a look on our "How do I prevent a file or registry entry from being uninstalled or repaired?" article which I think you may find useful.

Hope this helps somehow.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Install extra files over an existing application

This sounded like it might have been exactly what I was looking for but the help is useless for me apparently.

I am using AI 8.0 Enterprise edition. The help doesn't mention to what versions or editions they apply but apparently they do not apply to me as I am unable to find any of the references that are mentioned in either Method1 or Method 2. Am I mistaken or am I just not looking in the right place?

Ed
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Install extra files over an existing application

Hello Ed,

Thank you for your followup on this.

I have now downloaded the 8.0 version of Advanced Installer and I could indeed notice that the option I was talking about is not there.

However, I believe we can work this around.

To do so, please select the file that you do not want to be overwritten --> right click on it --> "Go to Component" (or simply press F8) --> check the "Never overwrite" and "Permanent" options for it.

Basically this is the "Method 2" presented in the article I have given you.

I have tested this and it seemed to work as intended (the file is not replaced during an Upgrade).

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ehardin
Posts: 85
Joined: Fri Jul 13, 2007 8:10 pm

Re: Install extra files over an existing application

Catalin,

Thank you very much for keeping up with this. I will try this method as soon as I can and let you (and anyone reading the thread) know how it goes.

Thanks again.

Ed
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Install extra files over an existing application

You are always welcome, Ed!

Always my pleasure to try and help.

Sure, take your time and please let me know the outcome once you had the chance to test this.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Re: Install extra files over an existing application

How did you go Ed. I would like to implement something very similar :) .
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Install extra files over an existing application

Hello,

If possible, could you please give me some more details about your scenario so I can further assist here?

This just in case Ed does not see the message so you can get faster assistance. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”