WIX 自动生成 GUID *? [英] WIX Autogenerate GUID *?

查看:33
本文介绍了WIX 自动生成 GUID *?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我生成了产品 ID 为 * 的 WIX XML 文件.对于每个组件 GUID,我也使用 *.

Let's say I generate my WIX XML file with a Product Id of *. Also for each Component GUID I use a *.

  <Product Id="*" Name="xxx" Language="1033" Version="1.0.0.0" Manufacturer="xxx" UpgradeCode="xxx">

在我每次编译我的 WIX 安装程序时都会旋转一个唯一的 GUID?假设我已经安装了 1.0.0 版的机器.然后我将我的 WIX 安装程序重新编译到版本 1.0.1.

Behind the scenes is the * spinning a unique GUID each time I compile my WIX Installer? Let's say I have version 1.0.0 installed a machine. Then I recompile my WIX Installer to version 1.0.1.

当我去安装 1.0.1 时,WIX 如何知道 1.0.0 已经安装,因此会删除所有文件/注册表项并安装 1.0.1?

When I go to install 1.0.1 how does WIX know that 1.0.0 is already installed and thus will remove all files/registry entries and install 1.0.1?

我应该使用来自 GUID 的 * 还是应该在我的 WIX XML 配置中使用唯一的 ID/GUID?

Should I be using * from GUID or should I have a unique ID/GUID in my WIX XML configuration?

推荐答案

Product/@Id="*" 随机生成一个新的GUID,对于产品代码来说已经足够了.Component/@Guid="*" 计算一个 GUID,只要您的目标路径保持不变,这个 GUID 就会保持不变,这是遵守组件规则所必需的.

Product/@Id="*" randomly generates a new GUID, which is sufficient for product codes. Component/@Guid="*" calculates a GUID that stays the same as long as your target path stays the same, which is necessary to comply with component rules.

这篇关于WIX 自动生成 GUID *?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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