我正在尝试为一款全局应用程序生成安装程序。以下是我的组件:
<Component Id="ProductComponent" Directory="InstallFolder" Guid="{MY_GUID}">
<File Id="ProductComponent" Source="$(var.MyApp.TargetPath)">
<Shortcut Id="StartMenuShortcut"
Name="MyApp"
Description="App Description"
Directory="MenuFolder"
WorkingDirectory="InstallFolder"
Icon="icon.ico" />
</File>
<RemoveFolder Id="RemoveMenuFolder" Directory="MenuFolder" On="uninstall" />
<RegistryValue Root="HKLM" Key="Software\Microsoft\MyApp" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
WiX输出以下内容:
错误ICE43:组件ProductComponent具有非广告快捷方式。它的KeyPath注册表键应该属于HKCU。
我不明白为什么它需要每个用户的KeyPath,而我打算将其作为每台计算机组件。这个键在另一个用户执行的卸载期间不会留下吗?或者它的缺失会导致修复期间出现重复?
似乎是这样,因为将其更改为HKCU后,我仍然收到以下内容:
警告ICE57:组件“ProductComponent”具有带有HKCU注册表KeyPath的每个用户和每台计算机数据。
所以我真的不知道如何避免任何这些错误/警告,除了将所有内容安装到用户配置文件中。