我想创建一个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 <> "" AND PASSWORD <> ""</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="&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&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_,Key(s): ServiceAccountDlg.Finish.NewDialog.ServiceAccountDlg.NOT 已安装的安装程序C:\ Projects \ VSTSBackup \ Installer \ Product.wxs 53
我做错了什么?
答案 0 :(得分:1)
在你的声明中:
发布Dialog =“ServiceAccountDlg”Control =“完成”......
在该对话框中似乎没有带有完成ID的控件。