在我的安装程序中,我尝试启动一个 Windows 程序,用户必须在该程序上执行一些与给出说明的页面并行的操作。为此,我添加了一个新页面(根据本教程)。现在我想在这个新对话框之前开始一个自定义操作,但我收到以下错误:错误 LGHT0094:未解决对“产品:*”部分中符号“WixAction:InstallUISequence/UserRegistrationDlg”的引用。
最小的例子:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Foobar 1.0' Id='*' Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'>
<Package InstallerVersion='300' Compressed='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'/>
<UI Id="MyWixUI_FeatureTree">
<DialogRef Id="TheNewDialog" />
<UIRef Id="WixUI_FeatureTree" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="TheNewDialog" Order="2">LicenseAccepted = "1"</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="TheNewDialog">1</Publish>
</UI>
<CustomAction Id="WindowsFeatures" Directory="TARGETDIR" ExeCommand="OptionalFeatures.exe" Execute="immediate" Return="asyncNoWait" />
<InstallUISequence>
<Custom Action="WindowsFeatures" After="TheNewDialog" >
NOT Installed AND NOT DOTNETINSTALLED
</Custom>
</InstallUISequence>
</Product>
<Fragment>
<UI>
<Dialog Id="TheNewDialog" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
</Dialog>
</UI>
</Fragment>
</Wix>
我试图代替 Before="TheNewDialog",将其设置为 After="WelcomeDlg" 但这会产生更有趣的错误:
- 错误 LGHT0094:未解决对“片段:”部分中符号“属性:应用程序文件夹名称”的引用。
- 错误 LGHT0094:未解决对“片段:”部分中符号“属性:WixAppFolder”的引用。
我一直在环顾四周,这似乎与 WixUI_Advanced 有关,但我不知道我是如何触发 Wix 认为我正在使用它。
我觉得我在引用错误时做了一些愚蠢的事情,但我似乎无法正确地使用我的手指,所以我希望有人能告诉我如何让它工作。