wix 安装程序失败错误代码 2819 [英] wix installer failing Error code 2819
问题描述
我正在尝试使用 wix 构建安装程序.
I am attempting to build an installer with wix.
它编译并运行.不幸的是,当我运行它时,我接受了许可协议并点击了下一步,然后它爆炸了.
It compiles and runs. Unfortunately when I run it, I accept the license agreement and hit next, then it explodes.
"安装程序在安装此程序时遇到意外错误包裹.这可能表明此包存在问题.错误代码是 2819."
"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2819."
这是我使用的代码
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="rd Installer" Language="1033" Version="1.0.0.0" Manufacturer="hs" UpgradeCode="upgradeCode">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="rd">
<Directory Id="BINFOLDER" Name="Bin"/>
<Directory Id="IMAGEFOLDER" Name="Image"/>
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="CMP_rd1" Guid="guid">
<File Id="rd1"
Name="r.d"
Source="D:\dir\file.txt"
KeyPath="yes">
</File>
</Component>
<Component Id="CMP_rd2" Guid="guid">
<File Id="rd2"
Name="r.d"
Source="D:\dir\file.txt"
KeyPath="yes">
</File>
</Component>
</DirectoryRef>
<Feature Id="DefaultFeature" Level="1">
<ComponentRef Id="CMP_rd1"/>
<ComponentRef Id="CMP_rd2"/>
</Feature>
<UI Id="UI_ReportDasboard">
<UIRef Id="WixUI_InstallDir"/>
</UI>
</Product>
</Wix>
我查看了许多示例,但似乎无法理解出了什么问题.我的代码看起来非常接近我见过的例子.我错过了什么吗?
I've looked at a number of examples and I cant seem to understand what's wrong. My code looks very close to the examples I've seen. Am I missing something?
推荐答案
您需要设置 WIXUI_INSTALLDIR 属性.
You need to set the WIXUI_INSTALLDIR property.
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
更多信息这里
这篇关于wix 安装程序失败错误代码 2819的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!