我正在使用Wix为产品编写安装包,整个过程是在x86中,但现在我需要在注册表的x64部分添加一个密钥.我环顾四周,发现这个堆栈的答案我认为可以解决我的问题.但我收到ICE80错误(不是警告),它告诉我我基本上需要将我的Package Platform属性更改为x64.
但我宁愿避免这种情况,因为正如我所提到的那样,只有一个注册表项需要在x64中.
所以我的问题是:是否有另一种解决ICE80错误的方法,或者我需要构建两个msi包,一个用于x86,另一个用于x64.
以下是我的一些代码,以进一步说明我正在尝试做的事情:
<Component Id="Foo" Guid="{GUID}" Win64="yes">
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\IniFiles">
<RegistryValue Type="integer" Name="Hello" Value="1"/>
</RegistryKey>
<Condition><![CDATA[VersionNT64]]></Condition>
</Component>
<Component Id="Bar" Guid="{GUID}">
<RegistryKey Root="HKLM" Key="Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\IniFiles">
<RegistryValue Type="integer" Name="Hello" Value="1"/>
</RegistryKey>
</Component>
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏!
我想以下面的方式设置注册表项
如果操作系统是Vista,那么HKLM\MyKey1\MyValue = 1否则HKLM\MyKey2\MyValue = 1
我知道如何在WIX中设置注册表项,但似乎无法在元素上设置条件.