Question

I have Windows program installation bootstrapper project. There is .NET Framework, Visual Studio C++ redistributable, device driver installer and my application installer in chain:

<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. DotNET package group defined as:

<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. 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?

Was it helpful?

Solution

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. InstallCommand for the Netfx45Xxx package group should look like:

    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.

  1. So, as I explained above, it seems that Windows force reboot hampered installation from reboot performing. 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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top