My Wix / Burn软件包正在Windows 7上安装.Net 4.6.1,目前.NET安装程序在我的Burn Setup窗口中触发并显示自己的UI窗口(两个进度条)。
有没有办法取消.Net安装程序用户界面并将消息传递给Burn MBA安装程序用户界面?
我的代码:
<Bundle Name="A Test Application" Version="1.0.0.0" Manufacturer="TM" UpgradeCode="{26B5D0A5-96E9-477D-8FE1-1DA027D534F8}">
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
<Payload SourceFile="..\TestBA\BootstrapperCore.config"/>
<Payload SourceFile="..\TestBA\bin\Release\TestBA.dll"/>
<Payload SourceFile="..\TestBA\bin\Release\GalaSoft.MvvmLight.dll"/>
<Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.10\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<Chain DisableSystemRestore="yes">
<PackageGroupRef Id='Netfx461Full' />
<MsiPackage SourceFile="..\DummyInstaller\bin\Release\DummyInstaller.msi" Id="DummyInstallationPackageId" Cache="yes" Visible="no"/>
</Chain>
</Bundle>
<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx461Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentVersion" Variable="WIN_Version" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="var_Netfx4" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="var_Netfx4x64" Win64="yes" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Release" Variable="var_Netfx4Release" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Release" Variable="var_Netfx4x64Release" Win64="yes" />
<PackageGroup Id="Netfx461Full">
<ExePackage Id="Net461" Name="Microsoft .NET Framework 4.6.1 Setup" Cache="no" PerMachine="yes" Permanent="yes" Vital="yes"
Compressed="yes"
InstallCommand="/q"
SourceFile="C:\Users\Martin\Documents\.Net Frameworks\NDP461-KB3102436-x86-x64-AllOS-ENU.exe"
DetectCondition="(var_Netfx4x64 << "4.6") OR (var_Netfx4x64 << "4.6")"
InstallCondition="(VersionNT < v6.0 OR VersionNT64 < v6.0) AND (NOT (var_Netfx4 OR var_Netfx4x64))" />
</PackageGroup>
</Fragment>
BootstrapperCore.Config
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
<section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<!--<supportedRuntime version="v2.0.50727" />-->
<supportedRuntime version="v4.0" />
<!--<supportedRuntime version="v4.6"/>-->
</startup>
<wix.bootstrapper>
<host assemblyName="TestBA">
<!--<supportedFramework version="v4.6" />-->
<supportedFramework version="v4\Full" />
<supportedFramework version="v4\Client" />
<!--<supportedFramework version="v3.5" />-->
</host>
</wix.bootstrapper>
</configuration>
我的目的是有一个用户窗口体验安装.Net 4.6.1(如果需要)然后我的应用程序,带有一个进度条和信息状态消息
答案 0 :(得分:0)
你确定它是离线安装程序吗?可能你正在使用在线安装程序。 这是正确的: https://www.microsoft.com/ru-ru/download/details.aspx?id=49982
我在一个窗口中运行的ExePackage示例:
<ExePackage Id="NetFx46Redist" DisplayName="Microsoft .NET Framework 4.6.1" Compressed="$(var.IsCompressed)" Cache="yes"
bal:PrereqSupportPackage="yes"
PerMachine="yes" Permanent="yes" Protocol="netfx4" Vital="yes" SourceFile="$(var.PRMSourceDir)NDP461-KB3102436-x86-x64-AllOS-ENU.exe"
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]"" RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]""
DetectCondition="(WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED=1)" />
不要使用此DetectCondition,将无效。
顺便说一句,你的检测条件完全错了。 检查说明: https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx