我的 bundle.wxs 中有一些 ExecPackages 链接。我有一个用于安装 .Net Framework 4.0 的 PackageGroup 部分。这已作为 PackageGroupRef 挂在链的开头。当我双击引导程序时,会弹出一个安装 .Net Fwk 的 .Net 框架安装窗口。安装 .Net 后,我希望引导程序显示托管 UI 并继续实际的安装活动。但是,问题在于它只是在 .Net 框架安装后停止。我必须第二次执行引导程序才能弹出 UI 并恢复安装。bundle.wxs 的内容是这样的:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="My-Installer"
Version="3.0"
Manufacturer="XXXX"
HelpUrl="XXXX"
UpdateUrl="XXXX"
UpgradeCode="XXXX">
<!--Compressed="no"-->
<!--Custom dialog is a WPF form-->
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config' SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\MyBootstrapperCustomUI.BootstrapperCore.config' />
<Payload SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\bin\$(var.Configuration)\MyBootstrapperCustomUI.dll' />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id='Netfx4Full' />
<ExePackage Id="MyPackage1"..../>
<ExePackage Id="MyPackage2"..../>
</Chain>
<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" Value="Version" Variable="Netfx35Version"/>
<PackageGroup Id="Netfx4Full">
<ExePackage Id="Netfx35" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" Name="MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" DetectCondition="Netfx35Version AND (Netfx35Version >= v3.5.30729.1)" InstallCommand="/q /norestart" UninstallCommand="/q /norestart"
InstallCondition="(NOT Netfx35Version OR (Netfx35Version < v3.5.30729.1)) AND NOT VersionNT >= v6.0"/><!--donot install if win7-->
<ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" Name="MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" InstallCommand="/passive /norestart" DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
</PackageGroup>
</Fragment>
</Wix>
</Bundle>