We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Thewads
Posts: 8
Joined: Thu Jul 18, 2013 3:49 pm

Upgrading with installer

Hi,

Currently working on a project where we are using Advanced Installer for our installers, and coming across difficulty in getting it to upgrade.
Installing for first time perfectly well, but currently to 'upgrade' we manually have to uninstall and then install the new installer.

I have looked through the page for the Upgrades Page: http://www.advancedinstaller.com/user-g ... rades.html and I have put in the following settings:
  • - Automatically upgrade older product versions
  • - Use original installation path when upgrading
  • - Uninstall old version first and then install new version
The installer is being built using a batch file to load in path variables and then use /execute with a commands.txt file.
The commands.txt file simply sets the Version number and some other properties. The Version number and properties are generated somewhere else and the commands.txt file is updated, but it comes out looking like this

Code: Select all

;aic
SetVersion 2.1.1 -noprodcode
Rebuild
When I am coming to upgrade, I get an error which says:
"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 Add/Remove Programs on the Control Panel"

I was under the assumption that by not changing the product code by using the -noprodcode' flag, this would mean it would upgrade?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Upgrading with installer

Hello,
"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 Add/Remove Programs on the Control Panel"
This is happening when you are using the same ProductCode because two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with that error.

Please keep in mind that Windows Installer allows you to upgrade an installation in multiple ways. The most important are:
- the automatic upgrade feature (the old package is uninstalled before the new one is installed)
- a patch

Each upgrade method requires a target package and an upgrade package. For the automatic upgrade feature the target and upgraded packages must have different Product Codes and different versions. For a patch, the packages must have the same Product Code and different versions.

Windows Installer will show the error you encountered if:
- the target and upgraded packages have the same Product Code and the same version, but different contents (for example: you created a package, you installed it, you modified its project, rebuilt the package and tried to install the new package without uninstalling the old one)
-the target and upgraded images have the same Product Code and different versions (for patches)

Please note that I've used the following command in a file of commands

Code: Select all

;aic
SetVersion -increment
Save
Rebuild
Using this set of command I ensure that a new ProductCode will be generated and also the version will be increased.

Please take a look on the Command Line article which may be useful to you.

If there is anything else I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Thewads
Posts: 8
Joined: Thu Jul 18, 2013 3:49 pm

Re: Upgrading with installer

Ok, thanks for that.

So if I use a different version, and a different product code, it should upgrade?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Upgrading with installer

Hello,

Yes, if you will use this approach it should work as expected.

This command will set the Product Version. Its equivalent UI option is “Product Version” in the Product Details Tab page. A new Product Code will be generated if the new version is different from the old one, unless the -noprodcode option was used. Read why in Changing Version. Also, the increment parameter will increment the existing product version.

Please take a look on the Set Version Command article which may be useful to you.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”