开发者

How to delete files from Installer during Minor upgrade

开发者 https://www.devze.com 2023-03-25 02:54 出处:网络
During Minor Upgrade in InstallShield 2011, how to delete/remo开发者_运维知识库ve some files which was installed from base installer and for next upgrade if we want to retrieve back the removed files

During Minor Upgrade in InstallShield 2011, how to delete/remo开发者_运维知识库ve some files which was installed from base installer and for next upgrade if we want to retrieve back the removed files how can we get back?


Overall Suggestion: Use one file per component. This avoids all kinds of component referencing problems and you can resurrect files on major upgrades if you need to bring them back after removing them.

Note that you generally cannot switch directly to using major upgrades if you have prior releases without wiping the slate clean and installing to a different location overall. Changing the installation directory and using new component GUIDs for all files wipes the slate clean and you are decoupled from old component referencing sins.


Minor Upgrade Limitations: Minor upgrades are very restrictive with regards to what they allow you to do in an upgrade scenario. I have written a summary of this before, and I will send you there for a quick read on the topic.

Quick Tips: I almost never use minor upgrades (for reasons that are clear after you read the above linked answer), but here are some extracts from Stefan Kruger's check list (MSI and deployment expert - MVP):

  • You can modify the contents of a component (add, remove or modify files, registry keys and shortcuts), but only if that component is not shared across features.
  • If you remove a file or registry key from a component, you must populate the RemoveFile or RemoveRegistry table respectively to delete the orphaned resource.

Though aging content, I believe the above is correct.

Major Upgrade: I would strongly recommend that you go for major upgrades in the future. If you are very strict with the component rules and don't break any referencing rules, you can reliably install major upgrades with Late REP - as we call it - meaning that the new version installs as a patch on top of existing files and then only removes obsolete files (as opposed to Early REP which fully uninstalls the old version and then installs the new version). A little bit more on Early / Late REP here.


Links:

  • Configuring Minor Upgrades to Remove Installed Data
  • http://www.installsite.org/pages/en/msi/updates.htm
  • Identifying When to Use Major and Minor Upgrades
  • Is there any possible way to perform upgrade when Product codes for old and new versions are same? (same as above, but original title)
  • Easily adding/removing files within a Minor update
  • Restarting windows service during WIX upgrade
0

精彩评论

暂无评论...
验证码 换一张
取 消