Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstallation of major upgrade removes nothing


3 replies to this topic

Boffy

Boffy
  • Members
  • 1 posts

Posted 19 October 2003 - 15:36

Hi,
I'm trying to upgrade my existing application to a new version. I have built major upgrade package (ProductCode, ProductVersion and PackageCode changed, Features tree kept) and want to update all program files, excluding some database files.

When I built a previous (first) version of the product, I placed all database files (that should not be overwritten during upgrade) to its own non-visible features.
During upgrade I search an existing version using Upgrade Table and specify
all features excluding database features in the REMOVE field.

After upgrading I have the following problems:
1. Add/Remove Programs contains two records of the product (previous and new). I should remove the previous product records using "msizap.exe" utility.
2. When I uninstall the upgrade, it removes no files, shortcuts and registry values.

I want to notice if I leave REMOVE table blank, the upgrade removes existing version fully and uninstall of the upgrade works fine. But I want to save the database files, therefore that way is not for me. I don't want to use custom actions to copy&save my database files, I want to use MSI mechanism only.

I use InstallShield Developer 7.03 SP3.
Thanks.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 30 October 2003 - 05:54

When you upgrade, the add/remove programs menu should not contain 2 versions of your product. This is your problem.

The upgrade table must not be setup correctly. If this is setup correctly, there will only be one instance of your product in add/remove programs, so when you uninstall, all of your files will be removed smile.gif


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 09 November 2003 - 03:28

This sounds interesting. I always uninstall and reinstall all features during major upgrades. As far as I know the upgrade table is only used during major upgrades. However, it does sound strange that you can chose to not uninstall certain features of a product that is installed. In effect that amounts to "half uninstalling" the product, and then installing a new product. Seems conceptually strange unless I am missing something (features can be used by many applications I suppose, but I wonder if this means that 2 product entries will show up in the add/remove applet).

I believe a work around for your problem would be to install the database component as "permanent components" (set the permanent flag in the property inspector to Yes). Even if you reinstall the product your existing database files should not be overwritten in case they have been modified since they were installed.
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 November 2003 - 08:33

I believe the correct way to do this would be to leave the Remove field empty. Instead set the msidbUpgradeAttributesMigrateFeatures flag in the Upgrade table, and make sure your RemoveExistingProducts action is NOT scheduled before InstallInitialize (but in one of the three other locations that the SDK suggests)