Q53
Posts: 3
Joined: Fri Mar 10, 2023 6:10 pm

Updates

I wish to create an update to an application:

>I am not using your updater
>I want a single exe
>I do not wish to change the product code
>I do not want to uninstall the old app
>I'd rather the update not be registered in Add Remove Programs.

Whatever combination of settings, I either get application already installed or application must be installed.
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Updates

Hello and welcome to our forums,

I'm afraid it is not possible to create an update without changing the ProductCode. The Product Code is used to uniquely identify a particular product release. Windows Installer allows only one program with a given product code to be installed on a computer at a time. It will prevent the installation of a second MSI with the same Product Code as a currently installed one. Advanced Installer will attempt to generate a new Product Code every time you change the Product Version.

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.

Not generating a new Product Code will ensure that only one version of the product can be installed on the computer. Also you must generate a new Product Code for side-by-side installation of different versions to work.

To achieve your scenario, you can try using a Patch. A patch only contains the differences between two versions of the same product. This means that through a patch you can only update a package that is already installed on the target machine.

An upgrade package is a stand-alone installer that can perform a first-time install in case the old product is not installed on the target machine. The patch will compare the two projects (installers) and contain only the difference between them.

A patch is usually much smaller in size and it consists of the diffs between two packages (an MSI is basically a database). After diffing two MSIs (e.g. version 1.0.0 and 1.0.1) the changes will be saved into the patch file (MSP). At install time, the patch basically attaches to the already installed MSI, i.e.: version 1.0.0 is installed --> we apply the patch --> we obtain version 2.0.0.

More details about this in our articles:

1. Authoring a Windows Installer patch

2. Creating Patches


A Windows patch package is an .MSP file that contains only the changes between the previous and the updated version of an application. It is used to install updated information such as files, registry, and configurations of an application that's already installed on a Windows operating system.

You also need to make sure that your patch fulfills all the Patch Rules.

I hope this gives you some guidance!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Q53
Posts: 3
Joined: Fri Mar 10, 2023 6:10 pm

Re: Updates

OK, what I did was use a different product code in the update and set Do not show in list for Windows Installer. I am able to install update after update without changing the product code again as long as I change the name of the update exe.
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Updates

Hello,

Thank you for your follow-up on this.

It's great to hear that you found a solution for your scenario.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”