Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Prerequisite cannot be installed, because it requires a reboot

Tue Oct 25, 2022 12:53 pm

Dear Advanced Installer Support Team,

Could you please take a look at the attached screenshot (qacl44)? That dialog is displayed quite frequently by our installer, and the required ODBC 17 prerequisite is really missing from those PCs after the installation is done.

Also I tried to install that prerequisite manually by starting the ODBC´s exe, and it seems it really cannot be installed due to a missing PC reboot (attached screenshot qacl44_2).

My questions is that how could we force a reboot somehow from our installer? Right now our customers will get the warning dialog with the question whether they would like to continue the installation -> obviously they will click on Yes -> our installer will install our product properly, BUT the prerequisite will be missing, so our product won´t work properly without it. The customers for sure won´t remember that they skipped a prerequisite installation, so they will complain.

We should somehow stop the installation if a prerequisite requires a reboot and we should show a dialog to explain them hat a reboot is needed.

What would you recommend?

Thanks in advance.

Best regards,
Zsolt Kollarits
Attachments
qacl44_2.png
qacl44_2.png (17.4KiB)Viewed 9732 times
qacl44.png
qacl44.png (18.06KiB)Viewed 9732 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Wed Oct 26, 2022 12:54 pm

Hello Zsolt,

To be fully honest with you, I have never seen that error message until now, but I guess you learn something new everyday.

Regarding your question, you could use the "Reboot system after installing this prerequisite" option set to "Always".
Screenshot_11.png
Screenshot_11.png (10.72KiB)Viewed 9718 times

Additionally, we have recently added the support to run a custom action before or after the installation of your prerequisite. So, if you want, you could force the restart through a custom action and display a friendly message to the customer to let him know why it is necessary.
Screenshot_12.png
Screenshot_12.png (26.72KiB)Viewed 9718 times

Hope this helps!

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Prerequisite cannot be installed, because it requires a reboot

Thu Oct 27, 2022 7:23 pm

Hi Catalin,

It seems we cannot trigger a reboot in case of feature based prerequisites, please take a look at the attached screenshot. Why is it the case? Our prerequisite I'm talking about is a feature based, and we would need to trigger a reboot.

Best regards,
Zsolt
Attachments
ForAI.png
ForAI.png (5.78KiB)Viewed 9697 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Tue Nov 01, 2022 1:52 pm

Hello Zsolt,

This is, I'm afraid, by design.

Feature based prerequisites are installed right when you press the "Install" button in your installer, but before the actual installation of the main MSI (to avoid the Windows limitation regarding two installations at the same time).

On the other hand, pre install prerequisites are handled by our EXE bootstrapper, just like the installation of the main MSI.

So, when you trigger a reboot after the installation of the pre-install prerequisites, we automatically try to create a scheduled task that, after reboot, will launch the MSI installer.

This is, unfortunately, not possible for feature-based prerequisites.

Do you know, by any chance, which of your prerequisites is requiring the reboot? By the first message, it looks like it is another setup which requires reboot. If so, if it's scheduled as a pre-install prerequisite, then you can try to reboot the machine after that installation and that should get rid of the "A previous installation required a reboot of the machine for changes to take effect..." message.

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Prerequisite cannot be installed, because it requires a reboot

Mon Nov 07, 2022 5:08 pm

Dear Catalin,

Don't you have any way of detecting whether a feature-based prerequisite is blocked by a pending reboot? Maybe a return value from Windows Installer, or whatever? It would be good if we could notify our users (a dialog custom action) somehow about a pending reboot, but we don't want to show such a notification prior or after a prerequisite installation, only if a reboot is really needed. Do you have any options for that?

Best regards,
Zsolt

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Fri Nov 11, 2022 3:58 pm

Hello Zsolt,

Please accept my apologies for the delayed reply on this.
Don't you have any way of detecting whether a feature-based prerequisite is blocked by a pending reboot? Maybe a return value from Windows Installer, or whatever?
I'm afraid not. To be fully honest with you, I am not even sure that's possible.

Most prerequisites are not even blocked by a pending reboot, this being the first time I see such a message.

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Prerequisite cannot be installed, because it requires a reboot

Mon Nov 14, 2022 2:30 pm

Dear Catalin,

Our idea is that when you start the installation of a prerequisite, then could you somehow get the return code coming back from Windows Installer? I mean, our ODBC prerequisite installer throws a kind of error, when a reboot is pending, even if we start it manually. So probably you can also determine that from Windows Installer, and based on a dedicated return value we could show a custom dialog for our users notifying them that a prerequisite won't be installed due to a pending reboot, they will need to install it manually later on.

What do you think?

Best regards,
Zsolt

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Mon Nov 14, 2022 2:58 pm

Hello Zsolt,

This sounds like a good solution, indeed.

For instance, can you manually launch the ODBC installer and check its log file for the return code? Maybe Windows Installer returns something specific in this case.

You can then use the "Save return value in this property" field from the "Setup Files" tab:
Screenshot_18.png
Screenshot_18.png (8.48KiB)Viewed 7844 times

to save the return code in a property which you can later use to condition the custom action.

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Prerequisite cannot be installed, because it requires a reboot

Wed Nov 16, 2022 4:57 pm

Dear Catalin,

Thank you for your tip, but the more we are thinking about, the more complex the problem seems to be :)

I'm just wondering whether we could prevent somehow that we show 2 dialogs about our ODBC prerequisite for the customer. You know during the prerequisite installation Dialog1 will show up -> this is displayed by you.

Then a bit later - as per you proposed us - I can show another dialog with an OK button, which is shown by our custom action, and we can defined its text (Dialog2)

The best solution would be if we could somehow overwrite the text on your dialog (Dialog1) and we could say something like:
"Warning 4154. Microsoft ODBC Driver 17 x64 prerequisite was not correctly installed.
Reason: A reboot is pending. Please reboot your PC before continuing.
Continue installation of Therefore 2022 Update 2 Client anyway?"

So somehow we would like to explain to our customers in one dialog, that either they suspend the installation, perform a reboot, and restart the installation OR they can continue, but then they will need to manually install the prerequisite after a reboot. Do you have any idea how we could do this in an elegant way (not using 2 dialogs)?

Best regards,
Zsolt
Attachments
Dialog2.png
Dialog2.png (16.46KiB)Viewed 7288 times
Dialog1.png
Dialog1.png (4.67KiB)Viewed 7288 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Thu Nov 17, 2022 4:39 pm

Hello Zsolt,

I'm afraid that what you want to achieve is not quite possible.

I do understand, however, that this is a bit of a troublesome scenario indeed.

I was thinking that perhaps, if it's not a requirement to install ODBC as a feature-based prerequisite, you could add it as pre-install and then checking the option to reboot the machine after the install. This, however, does not offer your customers an option to, for instance, refuse the reboot and do it later.

I am really wondering what prerequisite of yours requires a reboot that further blocks the installation of ODBC. Perhaps, if we know this, we can schedule the ODBC to be installed before that so it no longers shows this warning/error.

Hope this helps somehow!

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Prerequisite cannot be installed, because it requires a reboot

Sun Nov 20, 2022 9:42 pm

Dear Catalin,

On certain PCs a Windows Update is blocking the installation of our prerequisite (ODBC driver), that's why a reboot is needed. After discussing it internally we agreed that a solution that shows your dialog (please check my previous post) and our dialog (also in my previous post) is fine, but we would like to use a Yes/No dialog instead of the current OK dialog with a question something like "ODBC prequisite requires a reboot, please reboot your PC and restart the installation. Do you want to reboot now?"

So somehow we really would like to let the customer stop the installation procedure and trigger a reboot? Is there any AI or Windows Installer flag/property that we could use to trigger a reboot?

Thanks in advance :)

Best regards,
Zsolt

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisite cannot be installed, because it requires a reboot

Tue Nov 22, 2022 12:21 pm

Hello Zsolt,
So somehow we really would like to let the customer stop the installation procedure and trigger a reboot? Is there any AI or Windows Installer flag/property that we could use to trigger a reboot?
For this, you could try to use the REBOOT property

Hope this helps!

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

Return to “Common Problems”