jm-nov
Posts: 7
Joined: Thu Oct 14, 2021 6:08 pm

Error when upgrading prereq that forces reboot

Hello,

I have an installer (v1.0.0) with two "Feature-based" prereqs (also v1.0.0). These prereqs were each set to "Force Reboot after install", but I'd been passing the /norestart flag to suppress this.

I'm creating v2.0.0 of the installer (with v2.0.0 of each prereq). I made some changes to move the prereqs to "Pre-install" and set their behavior to "Suppress all Reboots and Reboot prompts". My problem is that when upgrading the from 1.0.0 to 2.0.0, it'll (successfully?) upgrade the first prereq, not attempt to upgrade the second prereq, and show an exception dialog stating "Prereq 2 mandatory prerequisite was not correctly installed."
Prereq Error.png
Prereq Error.png (28.54 KiB) Viewed 1882 times
My understanding is that during the upgrade, it uninstalls the version 1.0.0 of the prereq with the 1.0.0 installer (which is set to force reboot), then runs an install with the new 2.0.0 prereq installer (set to suppress all reboots). But because the old uninstall requested a reboot, the prereq upgrade returns 3010 to the main installer and terminates the main installation process (or something like that).

Is there any way to edit the new installer to avoid this? I tried adding CAs to set the REBOOT and MsiSystemRebootPending properties in the prereq installers, but those don't seem to have any impact.

I've attached a sample project that reproduces the problem. Just run version 1.0.0 of "Installer - Main" in the "Initial" folder, then version 2.0.0 of "Installer - Main" in the "Upgrade" folder.

Thanks,
- Justin
Attachments
prereq-installer-test-aips.zip
(22.72 KiB) Downloaded 107 times
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Error when upgrading prereq that forces reboot

Hello Justin,

First of all, please accept my apologies for the delayed reply.

Thank you very much for the provided resources.

I managed to reproduce the behavior you mentioned when testing the sample projects.

Unfortunately, I can not say for sure why this is happening. Please allow me some more time to discuss this with our development team and I will followup on this as soon as I will have more information.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jm-nov
Posts: 7
Joined: Thu Oct 14, 2021 6:08 pm

Re: Error when upgrading prereq that forces reboot

Hi Catalin,

I just wanted to follow-up on this issue. Any chance you have an update?

Thank you,
- Justin
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Error when upgrading prereq that forces reboot

Hello Justin,

It looks like somehow I managed to forget to followup here. Please accept my apologies for that.

After testing this, it looks like the issue relies in the fact that you changed your prerequisites in the second setup from "Feature-based" to "Pre-install".

Is there a reason why you did that?

If in the second setup, you schedule the prerequisites as "feature-based", just like in the first setup, everything will work as expected.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jm-nov
Posts: 7
Joined: Thu Oct 14, 2021 6:08 pm

Re: Error when upgrading prereq that forces reboot

Hi Catalin,

We'd previously encountered the issue outlined here: viewtopic.php?f=2&t=49868. In that case, our feature-based pre-reqs were getting moved to the post-install stage when running the installers passively.

The change from "Feature-based" to "Pre-install" was intended to ensure that the pre-reqs were installed in the correct order, prior to the main installation stage. However, when doing this, we obviously saw the behavior mentioned above.

- Justin
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Error when upgrading prereq that forces reboot

Hello Justin,

I have digged into this a little bit more and you are indeed right, this is exactly what happens:
But because the old uninstall requested a reboot, the prereq upgrade returns 3010 to the main installer and terminates the main installation process (or something like that).
To be fully honest with you, I am not quite sure what we could do - only from the upgraded setup - to avoid that, besides setting the "Continue with main installation even if the prerequisite was not installed" option from the "Properties" tab.

Basically, the prerequisite is installed correctly, but since it returns something else than "0", we interpret it as a failure, although it's installed.

By enabling that option, the check that we do after installing the prerequisite is no longer done.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”