abletech
Posts: 5
Joined: Wed Mar 14, 2012 9:22 am

Windows Installer Prerequisite suceeded but says Failed

Hi, we are including the Windows Installer 4.5 prerequisite, for Windows XP x86.

We tried the /quiet install command line, but it does an automatic machine reboot, and we prefer that the user is advised of the reboot action.

So we are now using the /norestart /passive command lines, so the hotfix is installed visually, but without user input, and it does not reboot the machine; than in the prerequisite setting of Advanced Installer, we enabled the option "Reboot system after installing this prerequisite".

It works, as the hotfix is correctly installed without user interaction, and at the end the Setup ask the user to reboot the computer, but it show status Failed: a customer could understand that the hotfix was not installed correctly... Please see screenshot attached.

How can we avoid this?
Attachments
screenshot_001.png
screenshot_001.png (237.27 KiB) Viewed 28014 times
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello,

I'm afraid this is the normal behavior. Please keep in mind that searches from "Prerequisites Install Condition tab" are performed twice:
- first to determine whether the prerequisite should be installed ( if the conditions are false)
- and second time, after the prerequisite has been installed, to determine whether the prerequisite install was successful ( when the conditions should be evaluated as true )
The reason you are getting this issue is because when your conditions were evaluated second time they failed, because the reboot wasn't performed.

So, in order to avoid this you can run the prerequisite package with /promptrestart command line parameter.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
abletech
Posts: 5
Joined: Wed Mar 14, 2012 9:22 am

Re: Windows Installer Prerequisite suceeded but says Failed

Thank you for the answer.

In this case, I suggest this feature: when performing the prerequisite condition search the second time, after the prerequisite has been installed, if the result is "Failed", but that prerequisite has been configured with "Reboot system after installing this prerequisite", you should not say "Failed", but something like "Reboot needed".

In fact that "Failed" status is not correct in my opinion, as Advanced Installer knows (for my flag) that reboot is needed for correct installation.

Can you implement this?
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello,

We'll consider your suggestion for adding this feature, but since yours is the only request, implementing it has very very low priority. Perhaps in the future we will increase its priority, but for the moment there are not immediate plans.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Windows Installer Prerequisite suceeded but says Failed

Sorry for reviving this old thread, but I'm having the same issue with the hotfix KB971512 on Vista SP2 (needed to support DX11). The prerequisite checks a dx dll but as a reboot is needed, the check fails the second time. It would be nice when the prereq wizard shows the 'need reboot' status or so and that the conditions are skipped the second time and the user will be shown a "Reboot machine" property on the last page of the setup. Is there any way to accomplish this in the current version?
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello Igor,

I'm afraid this is the default behavior of our prerequisites support. The requested improvement is still on our TODO list, but unfortunately I cannot give you an ETA for it as we have a lot of tasks on our roadmap for the moment.

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Windows Installer Prerequisite suceeded but says Failed

Thanks Daniel. I understand that there is an endless list of requested features. :) However maybe you can help me to make a workaround. I also send a mail to support about this, but maybe it would be better (for other users) to handle my question in the forum.

I've made a .js script that will check (by using WMI) if a hotfix is installed. This script can then be used as a condition for the hotfix. Usage: ''HotfixCheck.js KBxxxxxx'. Before the prerequisite is installed the script will correctly detect that the hotfix is not yet installed and after installing the hotfix it correctly detects the hotfix to be installed. This script can take a few seconds to return a value, but it does the job (adding extra conditions can help to prevent the script from executing when it's not needed).

Now the problem that remains is that I install the hotfix with the parameters /quiet /norestart to make sure the installer continues and I can install the application without rebooting. However at the end of the main installation I want to prompt the user to reboot the system (only!) if one of the prerequisites did need a reboot. Is this possible?
Attachments
HotFixCheck.js
Use this to check if hotfix is installed
(505 Bytes) Downloaded 706 times
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello Igor,
Now the problem that remains is that I install the hotfix with the parameters /quiet /norestart to make sure the installer continues and I can install the application without rebooting. However at the end of the main installation I want to prompt the user to reboot the system (only!) if one of the prerequisites did need a reboot. Is this possible?
In order to achieve this you can try to create your own custom action which will query the target system for pending reboots and if found, then set the "REBOOT" property to "FORCE".

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Windows Installer Prerequisite suceeded but says Failed

Daniel wrote:In order to achieve this you can try to create your own custom action which will query the target system for pending reboots and if found, then set the "REBOOT" property to "FORCE".
This looks like the solution I'm looking for though I don't know how to query the system for pending reboots. Is this something I can accomplish with AI (without writing my own tools)?
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello Igor,

I'm afraid we don't have predefined support to detect pending reboots. In order to achieve this you can write your own custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Igor Markovic
Posts: 17
Joined: Wed Jan 04, 2012 1:44 pm

Re: Windows Installer Prerequisite suceeded but says Failed

Too bad. However I did some more research and found the following interesting sites:
http://blogs.msdn.com/b/hansr/archive/2 ... eboot.aspx
http://msdn.microsoft.com/en-us/library ... s.85).aspx
http://msdn.microsoft.com/en-us/library ... s.85).aspx

I didn't do any tests with this yet, however maybe these sites can help others who also need this functionality (@everyone: let me know when you found a working solution).
El-ahrairah
Posts: 6
Joined: Mon Apr 28, 2014 3:54 pm

Re: Windows Installer Prerequisite suceeded but says Failed

Daniel wrote:Hello Igor,

I'm afraid this is the default behavior of our prerequisites support. The requested improvement is still on our TODO list, but unfortunately I cannot give you an ETA for it as we have a lot of tasks on our roadmap for the moment.

Thank you for your understanding.

All the best,
Daniel
I would like to add my support to Igor's request to avoid reboots.

We install the applications which we design to an industrial control system, where reboot time comes at a premium, and where (sadly) the persons conducting the installations often require a bit of hand-holding. Being able to control the rebooting process entirely through Advanced Installer would be nice.
Philm
Posts: 11
Joined: Fri Feb 13, 2015 1:04 am

Re: Windows Installer Prerequisite suceeded but says Failed

Hi, warming up this thread I want to add first my request for support at least for some reboot handlings of prerequisites in AI.

1. What could be done quite easily by AI: To add a new option that does not reboot after _each_ prerequisite (this function does not make much sense in fact, to be honest, at least not for setups who consist of a bunch of prereqs or multiple setups), but either after all prerequisites or to automatically set the REBOOT property at the end of the whole setup (Best would be to have both alternatives).

As long as AI does not provide this, with the given .js script in this script, I would recommend the following as a potential workaround:
1. The .js script for the recognition just have to contain the original test if the prereq requires a reboot (e.g. return code 3010 like for .NET, etc.).
2. If so, the script writes at an (own) defined registry place.
3. You read that registry key into your (last) MSI with standard ways into a property
4. You specify a standard custom action on setting the reboot depending on a condition.

Two more tips:
Speaking about .NET setups, AFAIR, normally they behave so, that a first install (e.g. 4.5 on Windows 7 or .NET 3 on XP) does not require a reboot, but an update like 4.x on a Windows 8++ machine will require a reboot.

Most reboots (file based) you can detect if there are registry values in "PendingFileRenameOperations" entry under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager key:
http://blogs.technet.com/b/brad_rutkows ... eboot.aspx

But I would not work with this, but getting the proper return code of the setups by a script. Most setup types (as well as prerequisite setups in special) provide one for reboots.
Daniel
Posts: 8268
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows Installer Prerequisite suceeded but says Failed

Hello Philip,

Thank you for your suggestion and for your feedback. We have added your request in our TODO list and hopefully an improvement will be available in the future.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”