PYRO0243 在构建补丁时
PYRO0243 while building patch
我在 RTM 中有以下 "Reg2015" 组件,但我忘记在其中分配 KeyPath:
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="Reg2015" Guid="{xxx}" Win64="no" >
<RegistryKey Root="HKLM" Key="SOFTWARE\Mine" >
<RegistryValue Name="RefCount" Value="1" Type="integer" />
<RegistryValue Name="Name" Value="Mine" Type="string" Action="write" />
</RegistryKey>
</Component>
...
</DirectoryRef>
为了准备补丁,我将 "RefCount" 更改为“2”并添加到补丁 wxs。
现在PYRO.EXE这样抱怨:
error PYRO0243: Component 'Reg2015' has a changed keypath in the transform 'C:\Patch\Patch.Wixmst'. Patches cannot change the keypath of a component.
error PYRO0260: Product '{xxx}': Table 'CreateFolder' has a new row 'INSTALLLOCATION/Reg2015' added. This makes the patch not uninstallable.
我知道因为没有"KeyPath",它的KeyPath默认为INSTALLLOCATION,但不知道组件ID被认为是一个目录
(1) 谁能解释一下为什么?
(2) 有什么方法可以传递 PYRO 错误吗?
(3) 对于我的下一个主要版本,如果我将 "KeyPath" 添加到任何 "RegistryValue" 元素,例如
<RegistryValue Name="RefCount" Value="1" Type="integer" KeyPath="yes" />
以后的补丁能把"RefCount"改成2吗?
谢谢。
我认为 WiX selected Refcount 作为组件的键路径——文档就是这么说的。 " 如果组件或子注册表值或文件的 KeyPath 未设置为 'yes',WiX 将按顺序查看组件下的子元素,并尝试自动 select 其中之一作为关键路径。允许 WiX 自动 select 关键路径可能很危险,因为在组件下添加或删除子元素可能会无意中导致关键路径发生更改,从而导致安装问题。“您可以通过以下方式验证使用 Orca 查看 MSI 文件以了解组件 table 对它的描述。
因此,更改键路径值可能会导致该问题。最好在组件中设置另一个注册表项(或创建一个新项)作为键路径。
我在 RTM 中有以下 "Reg2015" 组件,但我忘记在其中分配 KeyPath:
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="Reg2015" Guid="{xxx}" Win64="no" >
<RegistryKey Root="HKLM" Key="SOFTWARE\Mine" >
<RegistryValue Name="RefCount" Value="1" Type="integer" />
<RegistryValue Name="Name" Value="Mine" Type="string" Action="write" />
</RegistryKey>
</Component>
...
</DirectoryRef>
为了准备补丁,我将 "RefCount" 更改为“2”并添加到补丁 wxs。
现在PYRO.EXE这样抱怨:
error PYRO0243: Component 'Reg2015' has a changed keypath in the transform 'C:\Patch\Patch.Wixmst'. Patches cannot change the keypath of a component.
error PYRO0260: Product '{xxx}': Table 'CreateFolder' has a new row 'INSTALLLOCATION/Reg2015' added. This makes the patch not uninstallable.
我知道因为没有"KeyPath",它的KeyPath默认为INSTALLLOCATION,但不知道组件ID被认为是一个目录
(1) 谁能解释一下为什么?
(2) 有什么方法可以传递 PYRO 错误吗?
(3) 对于我的下一个主要版本,如果我将 "KeyPath" 添加到任何 "RegistryValue" 元素,例如
<RegistryValue Name="RefCount" Value="1" Type="integer" KeyPath="yes" />
以后的补丁能把"RefCount"改成2吗?
谢谢。
我认为 WiX selected Refcount 作为组件的键路径——文档就是这么说的。 " 如果组件或子注册表值或文件的 KeyPath 未设置为 'yes',WiX 将按顺序查看组件下的子元素,并尝试自动 select 其中之一作为关键路径。允许 WiX 自动 select 关键路径可能很危险,因为在组件下添加或删除子元素可能会无意中导致关键路径发生更改,从而导致安装问题。“您可以通过以下方式验证使用 Orca 查看 MSI 文件以了解组件 table 对它的描述。
因此,更改键路径值可能会导致该问题。最好在组件中设置另一个注册表项(或创建一个新项)作为键路径。