From ee2a2ac65dba9a0efd21a294fc5d609c0c5badd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Jan 2026 00:59:20 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20MSI=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=E5=8D=87=E7=BA=A7=E7=AD=96=E7=95=A5=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E6=95=B0=E6=8D=AE=E7=BB=A7=E6=89=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改内容: 1. 使用 MajorUpgrade 替代旧的 Upgrade + RemoveExistingProducts 组合 2. 设置 Schedule="afterInstallExecute" 确保新版本先安装完成再卸载旧版本 3. 添加 AllowSameVersionUpgrades="yes" 支持同版本覆盖安装 4. 添加中文降级错误提示信息 技术细节: - 旧策略使用 RemoveExistingProducts Before="InstallInitialize",会在安装新版本前先卸载旧版本 - 新策略使用 MajorUpgrade Schedule="afterInstallExecute",先安装新版本再卸载旧版本 - 用户数据保存在 HKCU\Software\Sand Soft\Desktop Notes,在升级过程中会被完整保留 - 这是 WiX 推荐的最佳实践,提供更安全可靠的升级体验 https://claude.ai/code/session_01JbJbLZrdhMn7p28mbyxdoX --- Product.wxs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Product.wxs b/Product.wxs index d9878b5..3dfcee9 100644 --- a/Product.wxs +++ b/Product.wxs @@ -22,13 +22,12 @@ - - - - + -