在次要升级期间如何从安装程序中删除文件 [英] How to delete files from Installer during Minor upgrade

查看:139
本文介绍了在次要升级期间如何从安装程序中删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在InstallShield 2011中进行次要升级期间,如何删除/删除从基本安装程序安装的某些文件;对于下一次升级,如果我们要取回已删除的文件,如何取回?

During Minor Upgrade in InstallShield 2011, how to delete/remove 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.

请注意,如果您具有以前的版本,则通常无法直接切换到使用主要升级,而无需擦拭所有内容并安装到其他位置.更改安装目录并为所有文件使用新的组件GUID会清除所有内容,从而使您脱离了引用旧组件的旧功能.

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.

快速提示 :我几乎从不使用次要升级(出于阅读上面链接的答案后显而易见的原因),但这是一些 Stefan Kruger的清单(MSI和部署专家-MVP):

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):

  • 您可以修改组件的内容(添加,删除或修改文件,注册表项和快捷方式),但前提是该组件不跨功能共享.
  • 如果从组件中删除文件或注册表项,则必须分别填充RemoveFile或RemoveRegistry表以删除孤立的资源.

尽管老化含量高,但我相信上面的说法是正确的.

Though aging content, I believe the above is correct.

主要升级 :我强烈建议您以后再进行主要升级.如果您对组件规则非常严格并且不违反任何引用规则,则可以使用 Late REP (我们称之为)可靠地安装主要升级,这意味着新版本将作为补丁安装在单击现有文件的顶部,然后仅删除过时的文件(与早期REP 相对,后者会完全卸载旧版本,然后安装新版本). 此处的早期/晚期REP的更多信息

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.

链接 :

  • 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

这篇关于在次要升级期间如何从安装程序中删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆