简体   繁体   English

WiX捆绑软件安装强制重启详细信息

[英]WiX bundle installation force reboot details

I have Windows program installation bootstrapper project. 我有Windows程序安装启动程序项目。 There is .NET Framework, Visual Studio C++ redistributable, device driver installer and my application installer in chain: 链中有.NET Framework,Visual Studio C ++可再发行组件,设备驱动程序安装程序和我的应用程序安装程序:

<Chain>
    <PackageGroupRef Id="Netfx45Xxx"/>

    <ExePackage Id="CppRedist"
        SourceFile="..\redist\vcredist_x86.exe" DetectCondition="VC2012CPPX86REDIST">
    </ExePackage>

    <MsiPackage Id="BlmInstall"
        SourceFile="..\bin\Release\BlmInstall.msi"></MsiPackage>
    <MsiPackage Id="UAUDriver" SourceFile="..\redist\setup.msi"></MsiPackage>
</Chain>

I want system to restart after .NET installation and then continue installation after reboot automatically. 我希望系统在安装.NET之后重新启动,然后在自动重新启动后继续安装。 DotNET package group defined as: DotNET软件包组定义为:

<Fragment>
    <PackageGroup Id="Netfx45Xxx">
        <ExePackage
            Id="Netfx45Xxx"
            Cache="no" Compressed="no"
            PerMachine="yes"
            Permanent="yes"
            Vital="yes" InstallCommand="/q"
            SourceFile="..\redist\dotnetfx45_full_x86_x64.exe"
            DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=225702"
            DetectCondition="NETFRAMEWORK40"
            InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion=&quot;4.5.50709&quot; OR Netfx4x64FullVersion=&quot;4.5.50709&quot;))">

            <ExitCode Value="1641" Behavior="forceReboot"/>
            <ExitCode Value="3010" Behavior="forceReboot"/>
            <ExitCode Value="0"    Behavior="success"/>
        </ExePackage>
    </PackageGroup>
  </Fragment>
  1. When the .NET Framework installation is finished, Windows shows its usual window containing the list of opened applications and asking user for force reboot. .NET Framework安装完成后,Windows将显示其通常的窗口,其中包含已打开的应用程序列表,并要求用户强制重启。 The issue is that those lists contains my setup application too. 问题是这些列表也包含我的安装应用程序。 It looks very lousy when my installation program asking the user to abort my herself and force reboot. 当我的安装程序要求用户中止我自己并强制重新启动时,它看起来非常糟糕。 How could it be solved? 怎么解决呢?

  2. After reboot installation continues, but the user is forced to read the license agreement and accept it again . 重新启动后,安装将继续,但是用户被迫阅读许可协议并再次接受它。 Is it possible to avoid it? 有可能避免吗?

Finally we managed to solve this issue: 最后,我们设法解决了这个问题:

  1. The exit codes were fine. 退出代码很好。 The reason was that the .NET installer command line argument /norestart was missed. 原因是错过了.NET安装程序命令行参数/norestart InstallCommand for the Netfx45Xxx package group should look like: Netfx45Xxx软件包组的InstallCommand应该如下所示:

    InstallCommand="/norestart /q" InstallCommand =“ / norestart / q”

With this value for InstalCommand, during our installation, Windows doesn't ask to force a reboot and allows installation to perform the reboot itself. 使用InstalCommand的此值,在安装期间,Windows不会要求强制重新引导,而是允许安装程序自行执行重新引导。

  1. So, as I explained above, it seems that Windows force reboot hampered installation from reboot performing. 因此,如上所述,Windows强制重新启动似乎妨碍了重新启动的执行。 Since it was finished abnormally I suggest that adding a special Windows registry entry for installation application to continue after system restart was not added. 由于异常完成,建议不要添加特殊的Windows注册表项,以使安装应用程序在系统重新启动后继续运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM