WIX - 是否可以为多个 MSI 创建语言中立的补丁?
我们有针对不同语言的多个 MSI,因此每个 MSI 都有自己的 ProductCode 和 UpgradeCode。使用英文 MSI,我们使用 Aaron 的方法在 http:// /blogs.msdn.com/astebner/archive/2007/10/26/5700191.aspx,例如蜡烛/灯/火炬/火炬 使用以下 Patch.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="xxx"
MoreInfoURL="xxx"
DisplayName="MyProduct First Patch"
Description="My Product First Patch"
Classification="Update Rollup"
>
<Media Id="5000" Cabinet="RTM.cab" >
<PatchBaseline Id="RTM"/>
</Media>
<PatchFamilyRef Id="PatchFamilyRollup"/>
</Patch>
<Fragment>
<PatchFamily Id='PatchFamilyRollup' Version='1.1.1.1' Supersede='yes'>
...
但是,当我们在安装了非英语 MSI 的计算机上应用此补丁时,我们会收到以下错误: “Windows Installer 服务无法安装升级补丁,因为要升级的程序可能丢失,或者升级补丁可能更新程序的不同版本。请验证您的计算机上是否存在要升级的程序,并且您有正确的升级补丁。”
所以我的问题是, 是否可以创建一个可以在任何语言上使用的补丁(MSP)? 如果是这样,需要做什么?
We have the multiple MSI's for the different languages, so each MSI has its own ProductCode and UpgradeCode. Using English MSI's, we created a patch using Aaron's approach in http://blogs.msdn.com/astebner/archive/2007/10/26/5700191.aspx, e.g. candle / light / torch / pyro
with the following Patch.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch
AllowRemoval="yes"
Manufacturer="xxx"
MoreInfoURL="xxx"
DisplayName="MyProduct First Patch"
Description="My Product First Patch"
Classification="Update Rollup"
>
<Media Id="5000" Cabinet="RTM.cab" >
<PatchBaseline Id="RTM"/>
</Media>
<PatchFamilyRef Id="PatchFamilyRollup"/>
</Patch>
<Fragment>
<PatchFamily Id='PatchFamilyRollup' Version='1.1.1.1' Supersede='yes'>
...
However, when we apply this patch on the machine where non-English MSI was installed, we get the following error:
"The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."
So my question is,
is it possible to create a patch (MSP) that can be used on any language?
If so, what needs to be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您应该尝试 Validate 元素,它是 PatchBaseline 的子元素,以及 torch.exe 命令行的验证标志。正确的位组合将让您安装补丁。
I think you should experiment with the Validate element, which is a child of PatchBaseline, and the validation flags of torch.exe command line. The right combination of bits will let you install your patch.
感谢Yan给了我正确的方向。我使用“Validate”元素和“torch”命令玩了几个小时,但遇到了同样的错误。然后我的同事向我展示了“TargetProductCode”元素。经过几次尝试,我终于成功了,尽管该解决方案并非完全与语言无关。我找到的答案是“Validate”元素和“TargetProductCode”元素的组合。我发布我自己的答案,以便有人从中受益。
Thanks Yan for giving me a right direction. I played with "Validate" element and "torch" command quite a few hours, but I got the same error. Then my co-worker showed me "TargetProductCode" element. After a few trials, I finally made it work although the solution isn't purely language-neutral. The answer I found is a combination of "Validate" element and "TargetProductCode" element. I am posting my own answer so that someone may get benefit out of it.