【问题标题】:WIX - Is it possible to create a language neutral patch for multiple MSI?WIX - 是否可以为多个 MSI 创建语言中性补丁?
【发布时间】:2011-08-09 18:48:24
【问题描述】:

我们有针对不同语言的多个 MSI,因此每个 MSI 都有自己的 ProductCode 和 UpgradeCode。使用英文 MSI,我们在 http://blogs.msdn.com/astebner/archive/2007/10/26/5700191.aspx 中使用 Aaron 的方法创建了一个补丁,例如蜡烛 / 灯 / 手电筒 / pyro 使用以下 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)? 如果是这样,需要做什么?

【问题讨论】:

    标签: wix windows-installer patch


    【解决方案1】:

    我认为您应该尝试使用 PatchBaseline 的子元素 Validate 和 torch.exe 命令行的验证标志。正确的位组合将让您安装补丁。

    【讨论】:

      【解决方案2】:

      感谢严给我一个正确的方向。我玩了几个小时的“验证”元素和“火炬”命令,但我得到了同样的错误。然后我的同事向我展示了“TargetProductCode”元素。经过几次试验,我终于让它工作了,尽管该解决方案并非纯粹是语言中立的。我找到的答案是“Validate”元素和“TargetProductCode”元素的组合。我发布我自己的答案,以便有人可以从中受益。

      <?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" >
                  <Validate ProductId='no' ProductLanguage='no' ProductVersionOperator='LesserOrEqual' UpgradeCode='no' />
               </PatchBaseline>
            </Media>
      
            <TargetProductCodes Replace='yes'>
               <!-- list all language specific ProductCode here. -->
               <TargetProductCode Id='{xxxxx}' /> <!-- ProductCode for English -->
               <TargetProductCode Id='{yyyyy}' /> <!-- ProductCode for French -->
            </TargetProductCodes>
      
            <PatchFamilyRef Id="PatchFamilyRollup"/>
         </Patch>
      ...
      

      【讨论】:

        猜你喜欢
        • 2015-01-14
        • 2015-04-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多