View Full Version : UpgradeCode/ProductCode - previous version does not unistall
alexzfirm
07-09-2007, 05:01 PM
Is there a good explanation of the UpgradeCode/ProductCode logic? It looks like the one from the help file is too complex - because I cannot make it work the way I want :)
I made 2 installers for 2 different versions of the product
Installer A
Version = 1.0.1.0
ProductCode = PA
UpgradeCode = UC
Installer B
Version = 1.0.2.0
ProductCode = PB (different from Installer A)
UpradeCode = UC (same as Installer A)
Installing A then B on the clean system.
Expected behavior - during B installation A will be automatically uninstalled. This does not happen. After B installation I end up with 2 entries for my product in the Control Panel\Add Remove Programs
Main question: What settings/configuration should I use to build each new version as "Minor Upgrade" that is distributed via re-installation?
Thank you
Alex
Lorne
07-10-2007, 10:03 AM
You should probably read up some more about the differences between major and minor upgrades in MSI before you distribute anything. The MSDN has some important information on minor upgrades (http://msdn2.microsoft.com/en-us/library/aa370037.aspx) and major upgrades (http://msdn2.microsoft.com/en-us/library/aa369786.aspx), and as with most things in MSI it's quite complicated. :) Those topics contain links to other topics with important information on them so be sure to follow the links and understand as much about the process as you can.
To answer your question, I believe you need to add the UpgradeCode for the product you're replacing to the "Upgrade codes" list (Project > Settings > Product tab). In this case, it will be the same upgrade code as the product you're installing.
alexzfirm
07-10-2007, 10:33 AM
You should probably read up some more about the differences between major and minor upgrades in MSI before you distribute anything.
I have read this article like 3 times yesterday and still do not see how to accomplish what we have now (based on the ancient InstallShield technology) using MSI.
Using MSI terminology we need a "Small update" distributed as full installer. But MSI does not support that. So the next best thing is doing Minor Update, so thats what we are trying to do.
That is really frustrating. Lets say you are in beta cycle and release 1 new build every few days. With MSI every customer has to go through uninstall/reinstall every freaking build. Am I just missing something :(?
To answer your question, I believe you need to add the UpgradeCode for the product you're replacing to the "Upgrade codes" list (Project > Settings > Product tab). In this case, it will be the same upgrade code as the product you're installing.
OK, I am going to try it. Thank you. That will automate the uninstall procedure, but still - it will be the full installation with all dialogs/license agreements even if you have just a minor build version increase.
Lorne
07-10-2007, 10:58 AM
The alternative is to build a patch. Right now there is no automated way to build a patch in Setup Factory for Windows Installer, however it is possible with a bit of work. See my post on building .msp patches (http://www.indigorose.com/forums/showpost.php?p=104272&postcount=7) in the Upgrading an install (http://www.indigorose.com/forums/showthread.php?t=20396) thread.
Note that although Windows Installer supports rudimentary binary differencing it is really, really terrible at it. Not only is it ridiculously slow, but it sometimes produces binary diffs that don't work (that won't apply successfully). Unless your files are under 6 MB you will probably want to use the "whole files only" option.
MSI patches come with their own limitations and complications so this isn't necessarily an easier solution for you, unfortunately.
If you aren't adding any files between versions (e.g. you just need to update data files) you may be able to use a non-MSI patching tool such as Visual Patch or Visual Patch Express, which both include an industry-leading binary differencing engine. However those products do not have any MSI support at this time.
alexzfirm
07-10-2007, 01:28 PM
If you aren't adding any files between versions (e.g. you just need to update data files) you may be able to use a non-MSI patching tool such as Visual Patch or Visual Patch Express, which both include an industry-leading binary differencing engine. However those products do not have any MSI support at this time.
First - thank you for all your answers and recommendations :)
No we do not want to go to the patch path. We release too frequently to maintain upgrade matrix for all the patches. We want to have the same installer that installs new copy of the software or upgrades any previous copy to the current version.
I think I am getting warmer though. It looks like I want "Small Update" or "Minor Update" and I want it applied by "reinstalling product" just like described in this article.
http://msdn2.microsoft.com/en-us/library/aa367575.aspx
How do I do that? Do I need to create some kind of a custom bootstrapper? I can see that in your library there is a function g_GetInstalledRunCommandLine() that uses the required command line parameters ("REINSTALL=ALL REINSTALLMODE=vomus"). But I do not understand how can I use it from the Setup Factory main project...
Do you have any sample projects/articles/etc related to "applying small updates by reinstalling"? Help please :)
jmaldonadom
11-18-2007, 04:36 PM
I am in the same circumstances. How to upgrade a previous version? I have followed this thread and made a lot of test without success. I do not want the user to uninstall the previous version, only rewrite files with the new versions.
Brett
11-20-2007, 10:18 AM
To update a previous version as a minor upgrade, you need to run the msiexec.exe with special command line parameters on the taget system:
msiexec.exe -i <path to your new msi file> REINSTALL=ALL REINSTALLMODE=vomus
That can be done from Start > Run on the user's system.
Unfortunately, that is the ONLY way to do a minor upgrade in MSI. There is no way to tell the MSI file to do that when it is double-clicked.
The easiest way to handle the situation is to use our standard bootstrapper which contains all of the logic to do all of this behind the scenes for the user - all that they have to do is to double-click the .exe file created by the bootstrapper.
We will be releasing a new version of SUFWI this week that includes a bootstrapper designer application and a script editor application that allow you to easily edit and modify custom bootstrapper scripts as well.
jmaldonadom
11-21-2007, 06:15 AM
Ok, thank you for your answer, and I saw that the bootstrapper standard works with the upgrade codes correctly.
jmaldonadom
11-22-2007, 11:47 AM
I got install new full version of the product, but I need to install only a few files.
I created an installer that includes only the files to replace, the same product code and the code update appropriate. The version number is updated in "Add / Remove Programs", but the files are not replaced.
Any thoughts?
My first project is to install the full version of the product. Subsequently, only modified files in distributing new versions, I do not need to distribute again DLL's or other auxiliary files. Only need to distribute new compilation of .Exe and few modified files (. Mdb,. Help ...)
It is possible?
jmaldonadom
12-14-2007, 08:02 AM
I created an installer that includes only the files to replace, the same product code and the appropriate code update . The version number is updated in "Add / Remove Programs", but the files are not replaced.
Any thoughts?
My first project is to install the full version of the product. Subsequently, only modified files in distributing new versions, I do not need to distribute again DLL's or other auxiliary files. Only need to distribute new compilation of .Exe and few modified files (. Mdb,. Help ...)
It is possible?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.