Reputation: 2302
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="4.5.50709" OR Netfx4x64FullVersion="4.5.50709"))">
<ExitCode Value="1641" Behavior="forceReboot"/>
<ExitCode Value="3010" Behavior="forceReboot"/>
<ExitCode Value="0" Behavior="success"/>
</ExePackage>
</PackageGroup>
</Fragment>
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?
After reboot installation continues, but the user is forced to read the license agreement and accept it again. Is it possible to avoid it?
Upvotes: 3
Views: 4417
Reputation: 2302
Finally we managed to solve this issue:
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.
Upvotes: 4