错误的安装目录路径
我正在 WiX 中创建一个安装项目,我使用 WixUI_Common 作为基础,并用我的自定义对话框扩展它。但是当用户进入InstallDirDlg对话框时,安装路径是“C:\”,这是完全不可接受的。尽管之前在我设置的代码中:
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="Component_SetupCM.wxs" Guid="60A58B24-CA71-44CE-947F-6BBDC7C6C89C" >
<File Source="Product.wxs" Id="Product.wxs" KeyPath="yes"/>
</Component>
</Directory>
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
那么问题可能是什么?
I am creating a setup project in WiX, I've used WixUI_Common as a base and extended it with my custom dialogs. But when the user gets to the InstallDirDlg dialog, the installation path is "C:\", and this is totally unacceptable. Although previously in the code I've set:
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="Component_SetupCM.wxs" Guid="60A58B24-CA71-44CE-947F-6BBDC7C6C89C" >
<File Source="Product.wxs" Id="Product.wxs" KeyPath="yes"/>
</Component>
</Directory>
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
So what could be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你需要这样的东西:
你遇到的问题是 TARGETDIR = c:\
UPDATE:
只要你还有这条线,
你就会继续遇到同样的问题。 TARGETDIR = c:\ 并且总是如此。
请注意,在我的示例中,我将 WIXUI_INSTALLDIR 设置为 INSTALLDIR 而不是 TARGETDIR。您的代码的问题不在于目录结构,而在于您将 WIXUI_INSTALLDIR 设置为错误的值。我上面的解决方案可以正常工作,因为我是从当前正在使用的项目中复制它的。
you need something like this:
The problem you are have is that TARGETDIR = c:\
UPDATE:
As long as you have the line
You will continue to have the same problem. TARGETDIR = c:\ and it always will.
Notice in my example I set WIXUI_INSTALLDIR to INSTALLDIR and not TARGETDIR. The problem with your code was not the directory structure so much as that you were setting WIXUI_INSTALLDIR to the wrong value. My solution above works as I copied it from a project I'm currently using.