我正在运行Wix 3.11.1,当尝试进行升级时,升级进入维护模式,并在“添加/删除程序”列表中留下两个条目.
原文链接:https://www.f2er.com/windows/371735.htmlProduct.wxs的简短版本具有以下内容:
<Product Id="*" Name="Boo" Language="1033" Version="1.1.0.0" Manufacturer="Foo" UpgradeCode="PUT-GUID-HERE"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/> <MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.NewerVersionInstalled)" />
升级代码:
3F55CE54-8409-4918-9906 – D8AD18794BFC
产品和包装代码是:
1.0
产品代码FC49F622-02E6-40D9-ACD9-92BDD4AF5979
包装代码6C49FAA1-5B11-4173-80A7-A7B3FA4313AE
1.1
产品号4871555F-F369-4159-9EF0-4BBDF07B6842
码包编码3594D7C2-D5AC-4A41-A8C6-6E3D63C6ACA0
当我使用日志记录运行安装程序时,我得到如下所示的日志信息.
当升级代码相同且产品和包代码不同,并且版本以前三位数递增时,我认为应该进行升级,但事实并非如此.这两个版本都是每台机器,所以不应该停止删除以前的版本.日志显示维护模式,从不执行先前版本的删除.我在msi中有一个升级表,它显示最大值1.1和WIX_UPGRADE_DETECTED作为操作.有谁知道什么会导致这进入维护模式而不是进行重大升级?
MSI (s) (68:9C) [15:04:38:423]: Doing action: RemoveExistingProducts Action 15:04:38: RemoveExistingProducts. Removing applications Action start 15:04:38: RemoveExistingProducts. RemoveExistingProducts: Application: {FC49F622-02E6-40D9-ACD9-92BDD4AF5979},Command line: UPGRADINGPRODUCTCODE={4871555F-F369-4159-9EF0-4BBDF07B6842} CLIENTPROCESSID=8344 CLIENTUILEVEL=0 MSICLIENTUSESEXTERNALUI=1 REMOVE=ALL MSI (s) (68:BC) [15:04:38:423]: Resetting cached policy values MSI (s) (68:BC) [15:04:38:423]: Machine policy value 'Debug' is 0 MSI (s) (68:BC) [15:04:38:423]: ******* RunEngine: ******* Product: {FC49F622-02E6-40D9-ACD9-92BDD4AF5979} ******* Action: ******* CommandLine: ********** MSI (s) (68:BC) [15:04:38:423]: Note: 1: 2203 2: C:\WINDOWS\Installer\inprogressinstallinfo.ipi 3: -2147287038 MSI (s) (68:BC) [15:04:38:423]: Machine policy value 'LimitSystemRestoreCheckpointing' is 0 MSI (s) (68:BC) [15:04:38:423]: Note: 1: 1717 2: Boo MSI (s) (68:BC) [15:04:38:423]: Calling SRSetRestorePoint API. dwRestorePtType: 1,dwEventType: 102,llSequenceNumber: 0,szDescription: "Removed Boo". MSI (s) (68:BC) [15:04:38:439]: The call to SRSetRestorePoint API succeeded. Returned status: 0,llSequenceNumber: 45. MSI (s) (68:BC) [15:04:38:439]: End dialog not enabled MSI (s) (68:BC) [15:04:38:439]: Original package ==> C:\WINDOWS\Installer\1179bb4.msi MSI (s) (68:BC) [15:04:38:439]: Package we're running from ==> C:\WINDOWS\Installer\1179bb4.msi MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: Uninstall Flags override found. MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: Uninstall VersionNT override found. MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: Uninstall ServicePackLevel override found. MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: looking for appcompat database entry with ProductCode '{FC49F622-02E6-40D9-ACD9-92BDD4AF5979}'. MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: no matching ProductCode found in database. MSI (s) (68:BC) [15:04:38:439]: Machine policy value 'DisablePatch' is 0 MSI (s) (68:BC) [15:04:38:439]: Machine policy value 'AllowLockdownPatch' is 0 MSI (s) (68:BC) [15:04:38:439]: Machine policy value 'DisableLUAPatching' is 0 MSI (s) (68:BC) [15:04:38:439]: Machine policy value 'DisableFlyWeightPatching' is 0 MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: looking for appcompat database entry with ProductCode '{FC49F622-02E6-40D9-ACD9-92BDD4AF5979}'. MSI (s) (68:BC) [15:04:38:439]: APPCOMPAT: no matching ProductCode found in database. MSI (s) (68:BC) [15:04:38:439]: Transforms are not secure. MSI (s) (68:BC) [15:04:38:439]: Command Line: UPGRADINGPRODUCTCODE={4871555F-F369-4159-9EF0-4BBDF07B6842} CLIENTPROCESSID=8344 CLIENTUILEVEL=0 MSICLIENTUSESEXTERNALUI=1 REMOVE=ALL MSI (s) (68:BC) [15:04:38:439]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{6C49FAA1-5B11-4173-80A7-A7B3FA4313AE}'. MSI (s) (68:BC) [15:04:38:439]: Product Code passed to Engine.Initialize: '{FC49F622-02E6-40D9-ACD9-92BDD4AF5979}' MSI (s) (68:BC) [15:04:38:439]: Product Code from property table before transforms: '{FC49F622-02E6-40D9-ACD9-92BDD4AF5979}' MSI (s) (68:BC) [15:04:38:439]: Product Code from property table after transforms: '{FC49F622-02E6-40D9-ACD9-92BDD4AF5979}' MSI (s) (68:BC) [15:04:38:439]: Product registered: entering maintenance mode
更新:
这确实是一个捆绑安装.我看着msi是罪魁祸首因为我认为Wix捆绑包会使用msiexec来执行卸载.
在我们的构建中,我们使用搜索词“0.0.0.0”作为bundle中的版本和msi然后我们用正确的版本替换,在构建结束时我们还原Bundle.wxs和Product.wxs.
当安装程序正在处理时,开发人员必须在构建文件中注释掉还原,以便处理文件.开发人员完成后,需要将版本设置回“0.0.0.0”.在其中一个安装程序检查中,有人不得不忘记改回“0.0.0.0”.