【问题标题】:Wix Custom Installer dialog throws errorWix 自定义安装程序对话框引发错误
【发布时间】:2018-02-07 15:44:07
【问题描述】:

我想创建一个 wix 安装包。 要求:一个欢迎对话框和一个用于插入服务安装的用户名和密码的对话框。 这是我的代码:

    <Product Id="e84cd420-ad5e-4476-967c-dba1543eda42" Name="VSTS Backup Service" Language="1033" Version="1.5.9"
         Manufacturer="test" UpgradeCode="9c52783e-e443-4ab1-8c57-3c9901d384f5">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MediaTemplate EmbedCab="yes" />
    <Feature Id="ProductFeature" Title="VSTS Backup Service" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>
    <UI>
        <Dialog Id="ServiceAccountDlg" Width="370" Height="270" Title="[ProductName] Setup">
            <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)">

                <Publish Event="WelcomeDlg" Value="0">1</Publish>
            </Control>
            <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
                <Publish Event="ExitDialog" Value="0">1</Publish>
                <Condition Action="disable"><![CDATA[ACCOUNT = "" OR PASSWORD = ""]]></Condition>
                <Condition Action="enable">ACCOUNT &lt;&gt; "" AND PASSWORD &lt;&gt; ""</Condition>
            </Control>
            <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes"
                     Text="!(loc.WixUICancel)">
                <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
            </Control>
            <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
            <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="Enter service account details.">
            </Control>
            <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes"
                     Text="Service account" />
            <Control Type="Text" Width="322" Height="26" X="25" Y="56" Id="BodyLabel"
                     Text="Specify the logon account for the [ProductName] service." NoPrefix="yes">
            </Control>
            <Control Type="Text" Width="275" Height="10" X="25" Y="98" Id="AccountLabel"
                     Text="&amp;Account name (Example: domain\\user or user@domain):" />
            <Control Type="Edit" Width="194" Height="15" X="25" Y="111" Id="AccountTextbox" Property="ACCOUNT" />
            <Control Type="Text" Width="275" Height="10" X="25" Y="135" Id="PasswordLabel" Text="Pa&amp;ssword:" />
            <Control Type="Edit" Width="194" Height="15" X="25" Y="148" Id="PasswordTextbox" Property="PASSWORD" Password="yes" />
            <Control Id="WarningLabel" Type="Text" X="40" Y="170" Width="200" Height="40"
                     Text="The account entered here will not be validated. Make sure that the account details entered are correct." />
        </Dialog>

        <UIRef Id="WixUI_FeatureTree" />
        <UIRef Id="ServiceAccount" />

        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ServiceAccountDlg" Order="3">1</Publish>
        <!-- skip the page on the way back too -->
        <Publish Dialog="ServiceAccountDlg" Control="Finish" Event="NewDialog" Order="3" Value="WelcomeDlg">1</Publish>
    </UI>

</Product>

问题是我在构建项目时遇到错误:

严重性代码描述项目文件行抑制状态 错误 ICE03:不是有效的外键;表:ControlEvent,列: Control_,键: ServiceAccountDlg.Finish.NewDialog.ServiceAccountDlg.NOT 已安装的安装程序 C:\Projects\VSTSBackup\Installer\Product.wxs 53

我做错了什么?

【问题讨论】:

    标签: xml visual-studio wix windows-installer setuptools


    【解决方案1】:

    在您的声明中:

    Publish Dialog="ServiceAccountDlg" Control="Finish"...

    该对话框中似乎没有 Id 为 Finish 的控件。

    【讨论】:

    • 好的,这个属性的正确值是多少?我想我正在尝试实现默认的 wix 对话框(som 结束/完成对话框)
    猜你喜欢
    • 2023-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-28
    • 1970-01-01
    相关资源
    最近更新 更多