wix – MSI主要升级覆盖规则
我想我在某个地方读过它,但现在无法找到它并且无法确认它:当安装(主要升级)来自MSI的新版本时,如果文件已被修改(由安装程序或用户),则默认规则是旧文件不会被新版本中的同一文件替换?
我想我也观察过我之前编写的安装程序中的行为,但现在经过一些更改后,似乎总是会替换旧的修改后的配置文件! 产品定义: <Product Id="*" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Advanced Software Solution" UpgradeCode="$(var.UpgradeCode)"> <Package Id="*" InstallerVersion="200" Description="The web service installer" Compressed="yes" InstallScope="perMachine"/> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 组件定义: <Component Id='WebConfigComp' Guid='GUID'> <File Id='WebConfigFile' Name='Web.config' Source='$(var.TheWebService.WCF.TargetBinPath)Web.Distribution.config' KeyPath='yes'> </File> </Component> InstallExecutesequence FindRelatedProducts 25 AppSearch 50 LaunchConditions 100 ValidateProductID 700 myScripts_CA 799 CostInitialize 800 FileCost 900 CostFinalize 1000 MigrateFeatureStates 1200 InstallValidate 1400 RemoveExistingProducts 1401 InstallInitialize 1500 BackupCA Installed 1501 ProcessComponents 1600 UnpublishFeatures 1800 SchedSecureObjectsRollback_x64 VersionNT > 400 1801 RemoveFiles 3500 RemoveFolders 3600 CreateFolders 3700 InstallFiles 4000 InstallServices VersionNT 5800 SchedSecureObjects_x64 NOT REMOVE~="ALL" AND VersionNT > 400 5801 ConfigureIIs NOT SKIPCONFIGUREIIS AND VersionNT > 400 5999 RegisterUser 6000 RegisterProduct 6100 PublishFeatures 6300 PublishProduct 6400 InstallFinalize 6600 LunchWCFReadme NOT Installed 6601 更新:我刚刚创建了一个用于测试的新项目,观察到相同的行为(修改后的文件被较新版本的安装程序替换),而不更改默认的InstallExecSequence.这可能意味着即使文件版本控制应该适用,但它实际上没有被踢入影响结果预期因为删除旧版本太早发生默认为Glytzhkof和PhilDW指出. 我正在使用Wix 3.8,目前稳定,我错过了什么? UPDATE2: <InstallExecuteSequence> <RemoveExistingProducts After="InstallExecute" /> </InstallExecuteSequence> 我正在添加,错误消息是
这也不是很有帮助. 最后更新:
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."> 资料来源:Wix Toolset website 所以包括MajorUpgrade确实会为你改变RemoveExistingProducts序列,这是一个有用的功能,但对我来说是意想不到的.感谢所有的帮助,现在开始的事情对我有意义.毕竟是一个幸福的结局!
如果主要升级在安装新版本之前卸载现有安装(InstallInitialize之前的RemoveExistingProducts),它通常会删除最初安装的所有文件 – 这包括可能已修改的文件.然后新版本安装了一个新的文件包.
如果在InstallFinalize之后安排RemoveExistingProducts,则在删除过时文件之前安装新版本的文件.在这种情况下,文件仅在版本化且比安装文件更新时才被替换,对于未版本化的文件(如txt,pdf等),文件替换规则基本上表明文件只有在未更改时才会被覆盖.磁盘. 因此,在InstallFinalize之后移动RemoveExistingProducts可能会解决您的文件“替换问题”,这实际上是在您当前的升级策略重新安装的卸载过程中删除已修改文件的情况. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows-server-2003 – 需要IPX的Server 2003 G
- Windows – 任何人都可以解释为什么“git status
- Windows – 从WinForms到Powershell-Console
- Windows上的PHP / MySQLi:插入MySQL innoDB表将
- Windows中为Latex添加.sty文件
- Flink EventTime 与 Window
- 使用Windows C API创建任意大小的文件
- windows – 通过LLVM或GCC定位WinRT
- windows-server-2008-r2 – 集群故障转移和奇怪的
- 1 windows MySql 5.6 安装