静默 .NET Wix 安装仍然要求用户确认已安装的包

Silent .NET Wix Install Still Asks User to Confirm Installed Packages

我们需要将 .net 4.6.1 离线安装程序捆绑到我们自己的 Wix 安装程序包中。 .net 组件必须是静默的或被动的。我们目前没有使用 Burn/bundle 语法,强烈建议我不要这样做,因为我们的其他产品 none 使用它。我们保证安装到 Windows 7 环境中。

我已经设法将所有 .Net 提示缩减为只要求用户确认安装,但即使这样也应该被隐藏。我在引导程序 product.xml 中尝试了 /passive/q 参数,但它仍然存在。从我在 Microsoft's documentation 中看到的情况来看,我已经做了所有必要的事情来使安装程序的 .NET 部分静音。在不完全改变我们的打包方法(切换到 Burn/bundles 或编写在安装之前执行的自定义 wix 任务)的情况下,我不知道还能尝试什么。

来自我的 products.xml(从 SDK 目录中提取的一个很好的块):

<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="EmbeddedNET461">
  <!-- Defines list of files to be copied on build -->
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" PublicKey="..."/>
  </PackageFiles>
  ...
  <Commands Reboot="None">
    <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.-->
    <Command PackageFile="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage Setup" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
      <!-- These checks determine whether the package is to be installed -->
      <InstallConditions>
        <!-- This command is only for Samesite -->
        <BypassIf Property="InstallMode" Compare="ValueEqualTo" Value="HomeSite" />
        <!-- This indicates .NET Framework Full is already installed -->
        <BypassIf Property="DotNet461Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394254" />
        <!-- Block install if user does not have admin privileges -->
        <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
        <!-- Block install on less than Windows Vista -->
        <FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.0.0" String="InvalidPlatformWinNT" />
        <!-- Block install if the platform is IA-64 -->
        <FailIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="IA64" String="InvalidPlatformArchitecture" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="1641" Result="SuccessReboot"/>
        <ExitCode Value="3010" Result="SuccessReboot" />
        <DefaultExitCode Result="Fail" FormatMessageFromSystem="false" String="GeneralFailure" />
      </ExitCodes>
    </Command>
  </Commands>

来自我的wixproj:

  <BootstrapperFile Include="Packages\DotNetFx461\EmbeddedNET461">
      <ProductName>.NET Installer 4.6.1</ProductName>
  </BootstrapperFile>
  ...
  ...
  <Target Name="AfterBuild">
    <Message Text="GenerateBootStrapper parameters:" />
    <Message Text="ApplicationFile: $(TargetFileName)" />
    <Message Text="OutputPath: $(OutputPath)" />
    <Message Text="Path: $(ProjectDir)\Bootstrapper" />
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="App Name" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="Relative" CopyComponents="True" OutputPath="$(OutDir)" Path="$(ProjectDir)\Bootstrapper" />
  </Target>

它发现安装程序很好。它服从 /norestart。它不遵守/q。我仍然在目标系统上得到以下信息。

我缺少什么来完全静音 .Net 安装?

我认为额外的 space 可能是导致此问题的原因 参数 =" /q /norestart /ChainingPackage 设置" 就在 /q

之前

该提示来自 Setup.exe 引导程序,而不是 .NET Framework 可再发行安装程序。