WiX 中各种 GUID 的作用(“错误:指定的帐户已存在") [英] Role of various GUIDs in WiX ("error: The specified account already exists")

查看:40
本文介绍了WiX 中各种 GUID 的作用(“错误:指定的帐户已存在")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试安装使用 WiX 构建的升级时,出现错误指定的帐户已存在",是的,我已阅读 Windows msi: error 1316: 指定的账号已经存在

When I try installing an upgrade built with WiX, I get the error "The specified account already exists" and yes, I have read Windows msi: error 1316: the specified account already exists

我对 WiX 项目文件中各种 GUID 的作用感到困惑.

I'm confused about the role of the various GUIDs in the WiX project files.

以前,我发布过版本.我的程序的5.4.35;Product.wxs 文件创建了一个 MSI 并包含以下指令:

Previously, I had released ver. 5.4.35 of my program; the Product.wxs file created an MSI and contained the following directives:

<Product Id="4DF780D3-60EC-43D3-A537-8484FE03B793"
         Version="5.4.35"
         UpgradeCode="A2F60910-A7FC-4B96-9375-EFBED25CC826">

Burner 使用以下 Bundle.wxs 文件从 MSI 创建了一个 EXE:

The Burner created an EXE from the MSI with the following Bundle.wxs file:

<Bundle Version="5.4.35"
        UpgradeCode="0694ce56-8095-450c-9859-881c0c9d56f7">

<小时>

我发布了一个新的 6.0.6 版本,除了版本没有改变.新的 Product.wxs 是:

<Product Id="4DF780D3-60EC-43D3-A537-8484FE03B793"   Same
         Version="6.0.6"
         UpgradeCode="A2F60910-A7FC-4B96-9375-EFBED25CC826">   Same

Bundle.wxs 是:

<Bundle Version="6.0.6"
        UpgradeCode="0694ce56-8095-450c-9859-881c0c9d56f7">    Same

用户报告在旧版本之上安装新版本失败,修复"不起作用.必须彻底卸载旧版本,安装新版本,不方便.

Users are reporting that installing the new version on top of the old version fails, the "Repair" doesn't work. They have to completely uninstall the old version, and install the new one, which is inconvenient.

安装程序确实包含一些自定义操作.没有组件或其他 GUID.

The installer does contain some custom actions. There are no component or other GUIDs.

我的问题:我应该更改什么以确保升级正常工作且没有错误?

My question: what should I change to insure that the upgrade works correctly and is error-free?

推荐答案

看看是否有帮助:

ProductCode 是标识此产品安装在系统上的 guid.您不能两次安装相同的产品(在相同的上下文中,严格来说,例如每台机器).根据定义,该产品已安装,因此尝试重新安装它会导致(通常)执行维护模式修复操作.除非您的自定义操作具有适当的条件,否则它们将再次运行 - 如果在安装其拥有的组件时运行了一个自定义操作,那么在作为修复的一部分重新安装该组件时它将再次运行,因此它将尝试创建再次用户.

The ProductCode is the guid that identifies that this product is installed on the system. You cannot install the same product twice (in the same context, strictly speaking, such as per machine). The product is already installed, by definition, so trying to reinstall it causes (usually) a maintenance mode repair action. Unless your custom actions have an appropriate condition they will run again - if there is a custom action that runs when its owning component is installed then it will run again when the component is reinstalled as part of a repair, so it will try to create the user again.

因此,重大升级需要新的 ProductCode,因为您现在有一个新的完整产品安装,如果有旧版本,则恰好删除了该产品的旧版本.

So a new ProductCode is required for a major upgrade because you now have a new complete install of the product that just happens to remove an older version of the product if there is one.

UpgradeCode guid 是一个产品线属性.当您运送 2012 年产品、2013 年产品和 2015 年产品时,每个产品都会替换旧的产品,那么它们将使用相同的升级代码,正是因为它用于搜索那些较早的产品并对其进行升级.

The UpgradeCode guid is a product line attribute. When you ship Product 2012, Product 2013, Product 2015 where each replaces the older one then they will use the same UpgradeCode precisely becaue this is used to search for those earlier products and upgrade them.

重大升级还要求 ProductVersion 在前 3 位数字中递增,有一个新的 PackageCode(通常是自动的)并且只升级相同的上下文(例如,每台机器将升级每台机器但不是每个用户安装).

A major upgrade also requires the ProductVersion to be incremented in the first 3 digits, have a new PackageCode (usually automatic) and will upgrade only the same context (e.g. per machine will upgrade per machine but not per user install).

此外,捆绑代码以 MSI 方法为模型,但未连接.这个想法是捆绑包具有相同的架构 - 他们需要检测当前的捆绑包并升级旧的捆绑包,因此他们也使用升级和产品代码,

Also, the bundle codes are modeled on the MSI method but are not connected. The idea is that bundles have the same architecture - they need to detect current ones and upgrade older ones, so they use upgrade and product codes too,

在您的情况下,您正在尝试安装相同的 ProductCode,这不是创建重大升级的良好开端.

In your case, you are trying to install the same ProductCode, which is not a good start to creating a major upgrade.

我认为捆绑包会生成详细的 MSI 活动日志,因此它们非常有用.

I think bundles produce verbose logs of the MSI activity, so they can be very helpful.

这篇关于WiX 中各种 GUID 的作用(“错误:指定的帐户已存在")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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