【问题标题】:Silent .NET Wix Install Still Asks User to Confirm Installed Packages静默 .NET Wix 安装仍要求用户确认已安装的软件包
【发布时间】:2019-07-26 01:16:51
【问题描述】:

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

我已设法将所有 .Net 提示缩减为仅要求用户确认安装,但即使是这样也应该被隐藏。我已经在 bootstrapper product.xml 中尝试了 /passive 和 /q 参数,但它仍然存在。从我在Microsoft's documentation 中看到的内容来看,我已经完成了使安装程序的.NET 部分静音所需的一切。在不完全改变我们的打包方法(切换到刻录/捆绑包或编写在安装之前执行的自定义 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 安装?

【问题讨论】:

    标签: .net installation bootstrapper wix3


    【解决方案1】:

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

    【讨论】:

    • 您知道如何禁用它吗? '/?'在 setup.exe 上没有显示任何静默选项。
    • 这是不可配置的。至少在引入时,引导程序 setup.exe 不支持标准开关。
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-23
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-27
      • 2019-06-28
      • 2021-10-12
      相关资源
      最近更新 更多