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

Removing files during a minor upgrade


3 replies to this topic

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 29 June 2010 - 05:33

This is something which confuses me time and again. We have a requirement to remove files during a minor upgrade. These files have been installed as part of our initial install. We are planning to provide a minor upgrade packaged as a full installer. As part of the minor upgrade process, we would like to have some files removed.

Now i have consistenly come across two suggested approaches:

1)Remove just the file, not the component. Populate the RemoveFiles table with this information.

I have myself followed this approach a number of times and it works correctly. In my case all of such removed files were the key files for those components.

However what confuses me is the numerous links i have seen which suggest that the key file cannot be altered/removed as part of a minor upgrade.

Here are those links:

http://kb.flexerasof...rMinorSmall.htm

http://kb.flexerasof...stalledData.htm

http://msdn.microsof...850(VS.85).aspx

I am using InstallShield as the authoring tool. However irrespective of the authoring tool, the windows installer rules should be applicable everywhere.

What is the correct approach? Can we remove key files during a minor upgrade retaining the components? Are there any circumstances under which this approach should not be used?

Thanks,

Kiran Hegde







vPanchumarthi

vPanchumarthi
  • Full Members
  • 56 posts

Posted 01 July 2010 - 08:18

Hi kirann,

First and foremost is , whenever you are chaning your chaning component code, even component deletion the best approach is a MAJOR UPGRADE.
Are you trying to delete the key components in minor upgrade ? or trying to delete the existing and replacing with a new file over the component?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 July 2010 - 16:00

If you change the key path of the component (as you do when you remove the key file) you would have to change the component GUID which in turn requires a Major Upgrade.

My recommendation would be not to remove the file but leave it in your setup (you can replace it with a 1 byte dummy if you need to save space). But set the component condition to 0 (= false), and set the component to "transitive" ("reevaluate condition"). This should uninstall the component during the update (because the condition is now false). No need for a removeFiles entry in the case. Of course this will remove the whole component, with all of the files, registry entries etc. that may be part of it.

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 11 July 2010 - 13:41

Stefan,

Thanks for the reply. This clears up things for me.


Regards,
Kiran Hegde