Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation WiX安装程序失败,错误代码为2819_Installation_Wix_Wix3.5 - Fatal编程技术网

Installation WiX安装程序失败,错误代码为2819

Installation WiX安装程序失败,错误代码为2819,installation,wix,wix3.5,Installation,Wix,Wix3.5,我正在尝试使用创建一个安装程序,它在开始时不显示许可协议。但我得到的错误如下 这是我目前拥有的完整Product.wxs文件。它编译并生成OK。为什么我会犯这样的错误?我的碎片部分在正确的位置吗?我已经删除了与许可证相关的发布元素,并修改了欢迎对话框的“下一步”按钮,以显示“安装目录”对话框,而不是许可证协议。这在帮助chm文件中提到过。那么我错过了什么 <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://sch

我正在尝试使用创建一个安装程序,它在开始时不显示许可协议。但我得到的错误如下

这是我目前拥有的完整Product.wxs文件。它编译并生成OK。为什么我会犯这样的错误?我的碎片部分在正确的位置吗?我已经删除了与许可证相关的发布元素,并修改了欢迎对话框的“下一步”按钮,以显示“安装目录”对话框,而不是许可证协议。这在帮助chm文件中提到过。那么我错过了什么

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="077765d1-236d-4299-b751-f921828f2ac8"
           Name="Wix Setup Example"
           Language="1033"
           Version="1.0.0.0"
           Manufacturer="NBL" UpgradeCode="1b0f72a7-8e17-4897-9f96-66509cc39573">

        <Package InstallerVersion="200" Compressed="yes"  />

        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder"  >
                <Directory Id="INSTALLLOCATION" Name="My Application Folder">
                    <Component Id="ProductComponent" Guid="MY-GUID-HERE">
                        <File Id="WindowsFormsApp.exe"
                            Source="../WindowsFormsApp/bin/Debug/WindowsFormsApp.exe">
                        </File>
                    </Component>
                </Directory>
            </Directory>
        </Directory>

        <Feature Id="ProductFeature" Title="WixSetupProject" Level="1">
            <ComponentRef Id="ProductComponent" />
        </Feature>

        <UI Id="WixUI_Advanced">
            <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
            <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
            <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
            <Property Id="WixUI_Mode" Value="Advanced" />

            <DialogRef Id="BrowseDlg" />
            <DialogRef Id="DiskCostDlg" />
            <DialogRef Id="ErrorDlg" />
            <DialogRef Id="FatalError" />
            <DialogRef Id="FilesInUse" />
            <DialogRef Id="MsiRMFilesInUse" />
            <DialogRef Id="PrepareDlg" />
            <DialogRef Id="ProgressDlg" />
            <DialogRef Id="ResumeDlg" />
            <DialogRef Id="UserExit" />

            <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
            <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>

            <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">Installed AND PATCH</Publish>

            <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>

            <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>

            <Property Id="ARPNOMODIFY" Value="1" />
        </UI>
        <UIRef Id="WixUI_Common" />
    </Product>
    <Fragment>
        <Property Id="ApplicationFolderName" Value="My Application Folder" />
        <Property Id="WixAppFolder" Value="WixPerMachineFolder" />

        <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
        <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />

        <PropertyRef Id="ApplicationFolderName" />
    </Fragment>
</Wix>

1.
"1"]]>
1.
未安装
安装并修补
1.
1.
不是WIXUI_DONTVALIDATEPATH
"1"]]>
WIXUI\u DONTVALIDATEPATH或WIXUI\u INSTALLDIR\u VALID=“1”
1.
1.
未安装
已安装但未安装修补程序
安装并修补
1.
1.
1.
1.
WiX文件的编辑版本,没有给出错误。但是,此版本跳过安装功能并浏览文件对话框:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="077765d1-236d-4299-b751-f921828f2ac8"
           Name="Wix Setup Example"
           Language="1033"
           Version="1.0.0.0"
           Manufacturer="NBL" UpgradeCode="1b0f72a7-8e17-4897-9f96-66599gg39573">

        <Package InstallerVersion="200" Compressed="yes"  />

        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLLOCATION" Name="My Application Folder">
                    <Component Id="ProductComponent" Guid="17e13748-8d44-47f6-b020-66d29f8a84fe">
                        <File Id="WindowsFormsApp.exe"
                            Source="../WindowsFormsApp/bin/Debug/WindowsFormsApp.exe">
                        </File>
                    </Component>
                </Directory>
            </Directory>
        </Directory>

        <Feature Id="ProductFeature" Title="WixSetupProject" Level="1">
            <ComponentRef Id="ProductComponent" />
        </Feature>

        <UI Id="WixUI_Advanced">
            <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
            <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
            <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
            <Property Id="WixUI_Mode" Value="Advanced" />
            <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />

            <DialogRef Id="BrowseDlg" />
            <DialogRef Id="DiskCostDlg" />
            <DialogRef Id="ErrorDlg" />
            <DialogRef Id="FatalError" />
            <DialogRef Id="FilesInUse" />
            <DialogRef Id="MsiRMFilesInUse" />
            <DialogRef Id="PrepareDlg" />
            <DialogRef Id="ProgressDlg" />
            <DialogRef Id="ResumeDlg" />
            <DialogRef Id="UserExit" />

            <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
            <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>

            <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="BrowseDlg" Order="1">1</Publish>
            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">1</Publish>

            <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="BrowseDlg">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="1">NOT Installed</Publish>
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>

            <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>

            <Property Id="ARPNOMODIFY" Value="1" />
        </UI>
        <UIRef Id="WixUI_Common" />
    </Product>

    <Fragment>
        <Property Id="ApplicationFolderName" Value="My Application Folder" />
        <Property Id="WixAppFolder" Value="WixPerMachineFolder" />

        <WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes" />
        <WixVariable Id="WixUISupportPerMachine" Value="1" Overridable="yes" />

        <PropertyRef Id="ApplicationFolderName" />
        <UI >
            <Dialog Id="CustomBrowseDlg" Width="370" Height="270" Title="!(loc.BrowseDlg_Title)">
                <Control Id="PathEdit" Type="PathEdit" X="25" Y="202" Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" />
                <Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)">
                    <Publish Event="SetTargetPath" Value="[_BrowseProperty]">1</Publish>
                    <Publish Event="EndDialog" Value="Return">1</Publish>
                </Control>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="Reset" Value="0">1</Publish>
                    <Publish Event="EndDialog" Value="Return">1</Publish>
                </Control>
                <Control Id="ComboLabel" Type="Text" X="25" Y="58" Width="44" Height="10" TabSkip="no" Text="!(loc.BrowseDlgComboLabel)" />
                <Control Id="DirectoryCombo" Type="DirectoryCombo" X="70" Y="55" Width="220" Height="80" Property="_BrowseProperty" Indirect="yes" Fixed="yes" Remote="yes">
                    <Subscribe Event="IgnoreChange" Attribute="IgnoreChange" />
                </Control>
                <Control Id="WixUI_Bmp_Up" Type="PushButton" X="298" Y="55" Width="19" Height="19" ToolTip="!(loc.BrowseDlgWixUI_Bmp_UpTooltip)" Icon="yes" FixedSize="yes" IconSize="16" Text="!(loc.BrowseDlgWixUI_Bmp_Up)">
                    <Publish Event="DirectoryListUp" Value="0">1</Publish>
                </Control>
                <Control Id="NewFolder" Type="PushButton" X="325" Y="55" Width="19" Height="19" ToolTip="!(loc.BrowseDlgNewFolderTooltip)" Icon="yes" FixedSize="yes" IconSize="16" Text="!(loc.BrowseDlgNewFolder)">
                    <Publish Event="DirectoryListNew" Value="0">1</Publish>
                </Control>
                <Control Id="DirectoryList" Type="DirectoryList" X="25" Y="83" Width="320" Height="98" Property="_BrowseProperty" Sunken="yes" Indirect="yes" TabSkip="no" />
                <Control Id="PathLabel" Type="Text" X="25" Y="190" Width="320" Height="10" TabSkip="no" Text="!(loc.BrowseDlgPathLabel)" />
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.BrowseDlgBannerBitmap)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.BrowseDlgDescription)" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.BrowseDlgTitle)" />
            </Dialog>
        </UI>
    </Fragment>
</Wix>

1.
"1"]]>
1.
1.
1.
1.
1.
不是WIXUI_DONTVALIDATEPATH
"1"]]>
WIXUI\u DONTVALIDATEPATH或WIXUI\u INSTALLDIR\u VALID=“1”
1.
1.
未安装
已安装但未安装修补程序
安装并修补
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.

错误代码2819表示“对话框[2]上的控件[3]需要链接到它的属性”(取自)。如果您提取MSI跟踪(将/l*v添加到命令行),您将能够看到[3]和[2]代表什么,并从那里继续调试。

删除会在MSI日志中出现以下错误:

DEBUG: Error 2819:  Control Folder on dialog InstallDirDlg needs a property linked to it
基本上这意味着“浏览文件夹”控件没有链接到实际的属性值。您已经为应用程序文件夹使用了值
INSTALLLOCATION
,这意味着您需要添加以下值来链接对话框:

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />


祝你好运

我的经验是:您应该在控件标记中添加属性。比如:

<Control Id="NameEdit" Type="Edit" X="45" Y="85" Width="220" Height="18" Property="USERNAME" Text="{80}" />


如我在回答中所述,将/l*v添加到msiexec命令line@user20358使用
msiexec/i product.msi/l*vx install.log运行安装。谢谢。我在脚本中有一个有效的guid。只需在这篇文章中写上“我的GUID-HERE”。)无论如何,我用您指定的属性更新了脚本,并做了一些更改。现在,这消除了错误,我可以跳过许可协议部分。但它不再提示我浏览文件夹和安装功能对话框。你能检查一下我的档案,看看我可能遗漏了什么吗?谢谢