WiX多字符串注册表项
我尝试将compatibility assistant的注册表项添加到wix设置中,如下所示:WiX多字符串注册表项,wix,registry,windows-installer,wix2,Wix,Registry,Windows Installer,Wix2,我尝试将compatibility assistant的注册表项添加到wix设置中,如下所示: <File Id="File1.exe" Name="File1.exe" LongName="File1.exe" Source="..\Binaries\File1.exe" DiskId="1" /> <File Id="File2.exe" Name="File2.exe" LongName="File2.exe" Source="..\Binaries\File2.exe"
<File Id="File1.exe" Name="File1.exe" LongName="File1.exe" Source="..\Binaries\File1.exe" DiskId="1" />
<File Id="File2.exe" Name="File2.exe" LongName="File2.exe" Source="..\Binaries\File2.exe" DiskId="1" />
<File Id="File3.exe" Name="File3.exe" LongName="File3.exe" Source="..\Binaries\File3.exe" DiskId="1" />
<Registry Root="HKLM"
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant"
Name="ExecutablesToExclude"
Type="multiString"
Action="append">
<RegistryValue Action="append" Value="[File1.exe]" />
<RegistryValue Action="append" Value="[File2.exe]" />
<RegistryValue Action="append" Value="[File3.exe]" />
</Registry>
<Registry Root="HKLM"
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant"
Name="ExecutablesToExclude"
Type="multiString"
Action="append">
<RegistryValue>[File1.exe]</RegistryValue>
<RegistryValue>[File2.exe]</RegistryValue>
<RegistryValue>[File3.exe]</RegistryValue>
</Registry>
但在安装时,不会生成密钥。我是否遗漏了什么或做错了什么?我从wix文档中得到了我正在做的事情的细节
更新:
语法有点不同,我想是因为我所指的问题使用了不同版本的WiX。我使用的语法是WIX2唯一接受的语法,这个WiX文件构建得很好——它只是不生成新的注册表项
更新:我误诊了这个问题;wix scrpit工作正常,但将值放在注册表的
Wow6432bit
节点中,因为包含的组件没有属性Win64=“yes”
,就我所见,WiX2中的元素没有属性。我想知道,您的示例是如何编译而没有错误的
无论如何,请尝试如下方式重写注册表元素:
<File Id="File1.exe" Name="File1.exe" LongName="File1.exe" Source="..\Binaries\File1.exe" DiskId="1" />
<File Id="File2.exe" Name="File2.exe" LongName="File2.exe" Source="..\Binaries\File2.exe" DiskId="1" />
<File Id="File3.exe" Name="File3.exe" LongName="File3.exe" Source="..\Binaries\File3.exe" DiskId="1" />
<Registry Root="HKLM"
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant"
Name="ExecutablesToExclude"
Type="multiString"
Action="append">
<RegistryValue Action="append" Value="[File1.exe]" />
<RegistryValue Action="append" Value="[File2.exe]" />
<RegistryValue Action="append" Value="[File3.exe]" />
</Registry>
<Registry Root="HKLM"
Key="Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant"
Name="ExecutablesToExclude"
Type="multiString"
Action="append">
<RegistryValue>[File1.exe]</RegistryValue>
<RegistryValue>[File2.exe]</RegistryValue>
<RegistryValue>[File3.exe]</RegistryValue>
</Registry>
[File1.exe]
[File2.exe]
[File3.exe]
在您所指的问题中,使用了
。你有什么理由不这么做吗?@Wimmel:我想这是因为它是WiX的不同版本。我已经更新了问题,提到了这一点。太好了,问题解决了!根据您提供的初始信息,我永远猜不到这一点……:)@燕:我也是。。。办公室里的其他人偶然发现了它:)我刚刚试过,得到了完全相同的效果——安装程序甚至没有创建多串键。