Tor*_*edt 7 windows-installer wix wix3.6
我正在尝试使用每台机器和x64架构设置在WiX 3.6中编写Windows Installer脚本.我有以下项目结构(缩短):
<Directory Id="ProgramFiles64Folder" Name="PFiles">
<Directory Id="APPLICATIONFOLDER" Name="My Company">
<Directory Id="ProductFolder" Name="My Product">
<Component Id="MainComponent" Guid="" Win64="yes" KeyPath="yes">
...
</Component>
<Directory Id="DataFolder" Name="Data">
<Directory Id="Machine" Name="Machine" >
<Directory Id="MachinesFolder" Name="Machines">
<Component Id="Machine1" Guid="{74341536-72DF-48C3-95E8-2851D9FA8318}" Win64="yes" KeyPath="yes">
...
</Component>
</Directory>
<Directory Id="TemplateFolder" Name="Template">
<Component Id="TemplateFiles" Guid="{A0D0C225-D604-4B84-971D-41687A30EC36}" Win64="yes" KeyPath="yes">
<File Id="Template1.rsbak" Source="$(var.SolutionDir)bin\Release\File1.rsbak" />
...
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
Run Code Online (Sandbox Code Playgroud)
问题是我ICE38: Component TemplateFiles installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file
在编译时收到了TemplateFiles组件的错误.令我困惑的是,我在另一个项目(工作)中使用了类似的结构,并且在我的项目中有几个组件具有完全相同的设置(上面未显示).为什么这个 - 也是唯一的 - 组件坚持在将所有其他人正确安装到用户配置文件时安装到Program Files?
看起来和文件夹msi
之间存在显着差异.最后一个在您的示例中引用:Program Files
Users\UserName\Documents
<Directory Id="DataFolder" Name="Data">
Run Code Online (Sandbox Code Playgroud)
我遇到了类似的问题并在博客文章中找到答案 - http://robmensching.com/blog/posts/2007/4/27/How-to-create-an-uninstall-shortcut-and-pass-all -The
简而言之,您需要RegistryKey
在HKCU
root 上定义为子元素Component
,并将RemoveFolder
元素添加为子元素Directory
.请参阅上面的链接以获取完整示例.此外:
KeyPath
从Component
元素中删除属性RemoveFolder
可能必须为所有文件夹定义.我使用了虚拟组件,里面没有文件 归档时间: |
|
查看次数: |
7487 次 |
最近记录: |