PDA

View Full Version : Possible to skip uninstall during major upgrade?



neeshd
05-26-2004, 06:21 PM
I am using IS Developer 7.04 - basic MSI project.

I am trying to create a Major Upgrade for my product. I want to design it such that it can do a fresh install, or an upgrade if an existing product is present.

If doing an upgrade, I do not want an uninstall to occur before the installation of the new files. I read that FindRelatedProducts looks for products with upgrade code specified in upgrade table, and sets OLDPRODUCTS to the code of any installed products. Later, RemoveExisting products invokes an uninstall of the product codes which are stored in OLDPRODUCTS.

So...can I give the action RemoveExistingProducts a conditon to never execute? Thay way my existing product is never uninstalled? Then I can just overwrite the existing files like a minor upgrade...

Also...what condition can I give to components or custom actions to say that there is already an existing product installed? I don't think "Installed" will work since the major upgrade has a different product code than the existing product.

Thanks

Neeshant Desai
Software Engineer
Hewlett-Packard

_doog_
05-27-2004, 09:58 AM
you do not have to make it so complicated...

windows installer has the functionality as you described it.

you have to:
1) set the msidbUpgradeAttributesMigrateFeatures property with the upgrade item in your upgrade table

2) you have to sequence the RemoveExistingProducts action appropriate so that the installer has the chance to migrate the existing features
i would sugest it should be
* between InstallExectute and InstallFinalize
or
* after InstallFinalize
more info for that is available in the msdn und "RemoveExistingProducts Action"