New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VC runtime installer can reboot system prior to installation finishing [CORE3900] #4236
Comments
Commented by: @reevespaul I'm not sure what to say about this. Let me add a few thoughts anyway. Part of the problem is that we are building with and consequently deploying the original MSVC8 runtimes, whereas all new Windows versions come with the later (SP1?) runtimes. Worse still, we can't, afaict, detect if the either of these runtime assemblies have already been installed. This seems to be a deficiency of wix v2.0. The other part of the problem is that we do not plan to deploy runtime assemblies with Firebird 3.0. It is built with MSVC10 which has abandoned this stupidity. All that is required is to drop the runtime into the same directory as the Firebird binaries. So, going forward, this problem will disappear naturally. The question is what, if anything, can be done for Fb 2.1 and Fb 2.5. I'll take a look at your suggestion of trapping the error and setting the reboot required flag. |
Modified by: @reevespaulassignee: Paul Reeves [ paul_reeves ] |
Commented by: Brenden Walker (braindead) Considering that this will be moot in the future, AND that our situation was likely an extreme edge case.. I think this is likely a low priority. Thanks for looking into this. |
Commented by: @reevespaul We don't seem to have had any other reports with this problem and as the OP indicated, it appears to be an edge case. I think we can close this issue. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @reevespaul I'll take another look. |
Commented by: Sean Leyne (seanleyne) Stefan Heymann today posted to the devel list:
|
Commented by: @reevespaul Here is some background to what is happening: There is a system level setting which determines when and how to do a system restart. By default the setting is to restart automatically if a restart is required. This can be over-ridden at the application level. The firebird installer is designed to not require a system restart. The problem here is when it calls msiexec to install the runtimes. No restart option is passed so the system default is used. msiexec has three restart options:
We can safely ignore the last one. So the choice comes down to /norestart and /promptrestart. /promptrestart appears to be the most sensible solution on first examination, but I have no idea how that will manifest itself to the user. I presume it will throw up a dialogue as well as setting an error flag. But msiexec is run silently and if the install is scripted this could present a bigger problem than the one we have at the moment. This means that /norestart would be the safest solution but with the small risk that the install may not work correctly for the few installs that require a reboot. However, in general it seems that active applications that might be using existing versions of the runtime libraries will continue to run and newly started appplications will pick up the new runtimes. At least that is the theory. All that the reboot does is clean things up by deleting the old runtimes. It would be helpful if we had some more information from a system that did a forced restart. The msiexec application writes a log out to {tmp}\vccrt{#msvc_version}_Win32.log and {tmp}\vccrt{#msvc_version}_x64.log If we could identify the cause of the restart I might be able to reproduce it and find the right solution. But I must admit that suppressing the restart completely is the best and simplest way to go. What do others think? |
Commented by: Brenden Walker (braindead) If VC is installed in PrepareToInstall you could run with /norestart and set the passed in var NeedsRestart if msiexec exitcode is 3010. That will allow InnoSetup standard restart handling to deal with it (including not restarting when /NORESTART is passed, which is what we expect). That should resolve the specific issue we had. All that said, as noted in my original post. We've only seen this happen on freshly imaged systems during the firstboot process. AFAIK we've worked around the issue on our end. As nobody else has reported this issue, I think it could be closed or at least made very low priority. |
Commented by: @reevespaul The other problem is that, as far as I can tell, innosetup does not pick up the errorcode from msiexec. At least, not when msiexec is executed from the [RUN] section. It puts us in a better place than where we are now, and side effects would be limited. |
Commented by: Brenden Walker (braindead) Indeed, you would have to run the installer in code. I don't know that it's any more risky that using the run section, but would definitely require more testing. In case you decide to go down the manual install path. Here's how we install dotnet, we do all of our dependencies in PrepareToInstall so that we can set NeedsRestart. const function InstallNETFramework(var NeedsRestart: Boolean): String; |
Commented by: @reevespaul Thanks for that Brendan. That will be useful. I will certainly look to include it or something like it for the next release of FB 3 or maybe Fb4 beta 2. But the immediate problem (which caused this report to be re-opened) is to provide a fix for Fb 2.5. My hope is to just add the norestart switch and then we can repackage and silently upload the new binaries. Fb 2.5 is no longer officially supported by the Firebird project but if this can be fixed with a simple repackaging then I think I can push it through. The last thing I want to do at this stage is try out a new bit of code. |
Modified by: @reevespaulstatus: Reopened [ 4 ] => In Progress [ 3 ] |
Modified by: @dyemanovFix Version: 3.0.5 [ 10885 ] |
Modified by: @pavel-zotovstatus: In Progress [ 3 ] => In Progress [ 3 ] QA Status: Cannot be tested |
Submitted by: Brenden Walker (braindead)
If the VC runtime installer needs to reboot to finish installation it will cause the FB installer to reboot the system with no warning (due to /qn passed to msiexec) before the FB installer finishes. This page http://desktopengineer.com/windowsinstallererrorcodes notes that msiexec returns exit code 3010 if a reboot is needed perhaps running always with /norestart and setting internal reboot required flag would be preferable.
The only time we've seen this is with freshly imaged Win 7 machines during the first boot process.
Commits: f90f322
The text was updated successfully, but these errors were encountered: