Ricky11
Posts: 7
Joined: Tue Jun 18, 2019 3:24 pm

Pending reboot loop, unable to install

Wed Sep 04, 2019 8:50 am

I keep getting the "reboot required" with the new pending reboot detection feature

I reboot the machine, run the installer, get the reboot message, reboot again, same issue, reboot again, same issue.

(on clean/fresh installed Windows 10 machines it works)

Is there any option to see what rules are checked by Advanced Installer? How to troubleshoot this? the logs tell me nothing:

Code: Select all

Action start 09:38:45: AppSearch.
AppSearch: Property: AI_SETUPEXEPATH, Signature: AI_EXE_PATH_LM
MSI (c) (B0:A0) [09:38:45:091]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (B0:A0) [09:38:45:092]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Caphyon\Advanced Installer\LZMA\{36379B15-B797-4EAB-8246-C264CB1B941D}\1.5.19239.2 3: 2 
AppSearch: Property: AI_SETUPEXEPATH, Signature: AI_EXE_PATH_CU
MSI (c) (B0:A0) [09:38:45:096]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (B0:A0) [09:38:45:096]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Caphyon\Advanced Installer\LZMA\{36379B15-B797-4EAB-8246-C264CB1B941D}\1.5.19239.2 3: 2 
Action ended 09:38:45: AppSearch. Return value 1.
MSI (c) (B0:A0) [09:38:45:097]: Doing action: LaunchConditions
Action 09:38:45: LaunchConditions. Evaluating launch conditions
Action start 09:38:45: LaunchConditions.
XYZ cannot be installed on systems that require a reboot. Please reboot the system and rerun the installer.
MSI (c) (B0:A0) [09:38:46:897]: Product: XYZ-- XYZ cannot be installed on systems that require a reboot. Please reboot the system and rerun the installer.

Action ended 09:38:46: LaunchConditions. Return value 3.
MSI (c) (B0:A0) [09:38:46:901]: Doing action: FatalError
Action 09:38:46: FatalError. 
Action start 09:38:46: FatalError.
Action ended 09:39:43: FatalError. Return value 1.
MSI (c) (B0:A0) [09:39:43:112]: PROPERTY CHANGE: Deleting AI_BOOTSTRAPPER property. Its current value is '1'.
MSI (c) (B0:A0) [09:39:43:112]: Doing action: AI_SHOW_LOG
Action 09:39:43: AI_SHOW_LOG. 
Action start 09:39:43: AI_SHOW_LOG.

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

Re: Pending reboot loop, unable to install

Wed Sep 04, 2019 10:35 am

Hello Ricky,
I keep getting the "reboot required" with the new pending reboot detection feature
Indeed, the launch condition is triggered if a reboot is pending on the system.

There isn't an option to see what are the rules that are checked by the launch condition. However, please allow me to try and explain this and hopefully this will help you troubleshoot the problem on your end.

As most Windows settings, a (pending) system reboot can be detected with the help of the registries. Here is a list with the values that can be manually checked to see if a system reboot is pending:

Key: HKLM:\SOFTWARE\Microsoft\Updates
Value: UpdateExeVolatile
Condition: Value is anything other than 0


HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager
PendingFileRenameOperations
value exists



Key: HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager
Value: PendingFileRenameOperations2
Condition: value exists



Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
Value: NA
Condition: key exists



Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Services\Pending
Value: NA
Condition: Any GUID subkeys exist



Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting
Value: NA
Condition: key exists



Key: HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending
Value: NA
Condition: key exists



Key: HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress
Value: NA
Condition: key exists



Key: HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending
Value: NA
Condition: key exists



Key: HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts
Value: NA
Condition: key exists



Key: HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon
Value: JoinDomain
Condition: value exists



Key: HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon
Value:AvoidSpnSet
Condition: value exists


Important: Please test this on a virtual machine

Beside that, we can also automatically detect a pending reboot using the "PendingReboot" PowerShell module, which contains the "Test-PendingReboot" cmdlet (this script simply checks the above specified registry entries).

Here are the steps that you can follow in order to achieve it:

1. open an elevated PowerSell session.

2. Install-Module PendingReboot

3. make sure that scripts can run on the machine. By default, the execution policy may be set to "Restricted". We can change it to "Unrestricted" so we can run the script (Set-ExecutionPolicy -ExecutionPolicy "Unrestricted").

4. Import-Module PendingReboot

5. Test-PendingReboot -detailed

That should show you the details about the pending reboot. Beside that, after the check is done, you can manually open the registry editor (win+R -> regedit.exe) and check it.

Hope this will help you troubleshoot your scenario.

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

Ricky11
Posts: 7
Joined: Tue Jun 18, 2019 3:24 pm

Re: Pending reboot loop, unable to install

Wed Sep 04, 2019 1:50 pm

Thanks Catalin for the extended reply, nice Powershell script!

It seems like it is Microsoft Defender ATP (a Microsoft E5 security component, not to be confused with Defender Anti-Virus)
Is there any way to exclude these PendingFileRenames from the check? As this component runs on every boot?

This is the result:

Code: Select all

ComputerName                     : LT-XYZ
ComponentBasedServicing          : False
PendingComputerRenameDomainJoin  : False
PendingFileRenameOperations      : True
PendingFileRenameOperationsValue : {\??\C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollec
                                   tion\6999.3160420.0.3297268\59286df2-a262-407f-8bd5-7e6fcf044310.ps1, ,
                                   \??\C:\ProgramData\Microsoft\Windows Defender Advanced Threat
                                   Protection\DataCollection\6999.3160420.0.3297268, ...}
SystemCenterConfigManager        :
WindowsUpdateAutoUpdate          : False
IsRebootPending                  : True
a lot of the pending operations are just .TXT files Defender ATP uses and renames apparantly

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

Re: Pending reboot loop, unable to install

Thu Sep 05, 2019 11:03 am

Hello Ricky,

You are always welcome. I am glad my explanation helped you.

Indeed, that PendingFileRenames operation can be annoying. When there is a rename operation pending on the Operating System, it saves the names of the files in the registries so, upon rebooting, when the registries are loaded into the memory, it should know what files should be renamed.

However, this doesn't seem to always work (as in your case. For instance, in my case it works as expected after the reboot).

As explained previously, we use the exact same logic as in that PowerShell script. The only difference is that we implemented it in native C++ instead of a PowerShell script.

Unfortunately, we do not offer predefined support to exclude that from the check (e.g. from the UI). Besides that, as you can probably imagine, if we remove it at all from the checks, there will probably be users that will come in the future and request it (as it was requested in the past), so that is not an option either (hopefully you can understand this).

A solution would be to (first disable the option from the "Launch Conditions" page and then) create your own custom action that does the checks (the custom action can be whatever from a VBScript, PowerShell script, a C# dll, etc.). This custom action, in order to replicate the option from the "Launch Condition" page, should be scheduled between the "AppSearch" standard action and "FindRelatedProducts" action in the "Wizard Dialogs Stage".

By default, these actions are hidden. To "show" them, all you have to do is to go to "Custom Actions" page --> right click on the "Searches" action group" --> "Show Standard Action" --> "Searches" --> "AppSearch". After doing so, repeat the earlier step, but simply replace the "AppSearch" with the "FindRelatedProducts" action.

After doing so, simply schedule the custom action between them by drag & dropping it in the appropriate space.

As I have said previously, we use almost the exact same logic as in the PowerShell script.

When you install a script, as you have done previously, the script content can be found in the following path:

%programfiles%\WindowsPowerShell\Modules

For instance, the content of our script can be found at the following path:

%programfiles%\WindowsPowerShell\Modules\PendingReboot\0.9.0.6\pendingreboot.psm1

where the %programfiles% env variable represents the drive where your OS is installed (e.g. C:\) + the ProgramFiles folder --> e.g. C:\ProgramFiles.

Starting with that script, you can modify it so it will check only for what you need and then add it as a "PowerShell Inline Script".

Hope this helps.

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

Ricky11
Posts: 7
Joined: Tue Jun 18, 2019 3:24 pm

Re: Pending reboot loop, unable to install

Thu Sep 05, 2019 4:43 pm

Thanks Catalin,

Surely helpfull, one thing, can you add the reason/check to the advanced installer log, that will help people more quickly solve this.

(either by just deleting the pending keys in these circular loops)

So please add something like this in the log:
Pending reboot detected based on: HKLM\CurrentControlset\etc\etc

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

Re: Pending reboot loop, unable to install

Fri Sep 06, 2019 10:16 am

Hello Ricky,

You are always welcome. I am glad this information was helpful for you.

In what regards your request, if needed, you can always write some events to the log file through the help of a VBS custom action. Please have a look on the following article for more information about this:

How to write a specific event to the log

Hope this helps.

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

Ricky11
Posts: 7
Joined: Tue Jun 18, 2019 3:24 pm

Re: Pending reboot loop, unable to install

Sun Sep 08, 2019 6:44 pm

Hi Catalin,

Thanks for the tip, I'm more worried about customers, for me the Log file is already filled with lots of unrelated rows, but the main reason why it failed is not in the log file.

I expected the error in the log to tell me WHICH registry keys failed for the reboot detection.

I don't think we can determine all the use cases that could go wrong with your default behaviour. Just a single line would help customers to look for the registry key.

Would it be possible to add this to Advanced Installer?

Thanks,
Erik

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

Re: Pending reboot loop, unable to install

Tue Sep 10, 2019 1:57 pm

Hello Erik,

Thank you for your followup on this.

I have forwarded your request to our development team and I will let you know once I will have the feedback from them.

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

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

Re: Pending reboot loop, unable to install

Tue Sep 10, 2019 2:39 pm

Hello Erik,

As a followup to my last thread, I have had a discussion with the developer in charge for this option and, in the future, we will try to log some information about the checks, so the users will be able to know what actually requires a reboot on their machine without having to use the script as I have explained in the above threads.

Thank you for bringing this to our attention.

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

Ricky11
Posts: 7
Joined: Tue Jun 18, 2019 3:24 pm

Re: Pending reboot loop, unable to install

Wed Oct 23, 2019 10:58 am

Any update on the advanced reporting of the reason?

Still unable to install on my machine, removed the "PendingFileRenameOperations" registry key, ran the
Test-PendingReboot:

ComputerName : LT-123456
ComponentBasedServicing : False
PendingComputerRenameDomainJoin : False
PendingFileRenameOperations : False
PendingFileRenameOperationsValue : {}
SystemCenterConfigManager :
WindowsUpdateAutoUpdate : False
IsRebootPending : False

But still the installer fails:
MSI (c) (D4:34) [11:53:06:252]: Doing action: LaunchConditions
Action 11:53:06: LaunchConditions. Evaluating launch conditions
Action start 11:53:06: LaunchConditions.
CSAT cannot be installed on systems that require a reboot. Please reboot the system and rerun the installer.
MSI (c) (D4:34) [11:53:08:964]: Product: XYZ-- XYZ cannot be installed on systems that require a reboot. Please reboot the system and rerun the installer.

Action ended 11:53:08: LaunchConditions. Return value 3.
MSI (c) (D4:34) [11:53:08:966]: Doing action: FatalError
Action 11:53:08: FatalError.
Action start 11:53:08: FatalError.
Action ended 11:53:10: FatalError. Return value 1.

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

Re: Pending reboot loop, unable to install

Tue Oct 29, 2019 3:29 pm

Hello Erik,
Any update on the advanced reporting of the reason?
I am not quite sure what you mean by this. However, if your question was about the log improvement (where we log information about the operation that requires a reboot), unfortunately that has not yet been implemented.

In what regards the second issue, I can not say for sure why this happens. Most probably, there may be more to our validation (probably another registry key that we are looking for and that is not taken in consideration in the script). For this, I will have to further discuss with the developer in charge of this piece. Once I will find any advancements with my investigations, I will update this thread.

In addition to the above, have you tested this scenario on multiple machines? If so, does it reproduce on all?

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

dwilsonAI
Posts: 3
Joined: Thu Sep 24, 2020 5:55 pm

Re: Pending reboot loop, unable to install

Thu Sep 24, 2020 6:42 pm

Catalin wrote:
Tue Oct 29, 2019 3:29 pm
Hello Erik,
Any update on the advanced reporting of the reason?
I am not quite sure what you mean by this. However, if your question was about the log improvement (where we log information about the operation that requires a reboot), unfortunately that has not yet been implemented.

In what regards the second issue, I can not say for sure why this happens. Most probably, there may be more to our validation (probably another registry key that we are looking for and that is not taken in consideration in the script). For this, I will have to further discuss with the developer in charge of this piece. Once I will find any advancements with my investigations, I will update this thread.

In addition to the above, have you tested this scenario on multiple machines? If so, does it reproduce on all?

Best regards,
Catalin
Hello Catalin,
We have a user who is running into a similar reboot-loop problem on 5 different computers. Have there been any updates with the log improvement, or any additional information regarding what triggers the "reboot required" message?

Thank you in advance,
Daniel

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

Re: Pending reboot loop, unable to install

Mon Sep 28, 2020 5:12 pm

Hello Daniel,

Unfortunately, this feature has not yet been added to Advanced Installer.

However, I have now increased its' priority and hopefully it will be implemented in a future version of Advanced Installer.

In what regards your issue, could you please run a quick test of the most common pending reboots and see if any of those triggers your launch condition?

The first one would be the reboot pending for a Windows Update.

This can be done, in Windows 10, by going to "Settings" --> "Update & Security" --> "Status".

Besides that, two registry keys can also be checked:

Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
Value: NA
Condition: key exists


Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting
Value: NA
Condition: key exists


Another common pending reboot is encountered when a file is to be renamed. This can be checked in the following registry keys:

HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager
PendingFileRenameOperations
Condition: value exists



Key: HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager
Value: PendingFileRenameOperations2
Condition: value exists


Additionally, could you please let me know if, a reboot is performed before launching the setup, the launch condition is still triggered?

Hope this helps somehow!

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

dwilsonAI
Posts: 3
Joined: Thu Sep 24, 2020 5:55 pm

Re: Pending reboot loop, unable to install

Mon Sep 28, 2020 7:35 pm

Hi Catalin,
Thank you for increasing the priority of this feature.

Unfortunately, none of those registry keys on the user's machine indicate a pending reboot. The user also tried rebooting several times before running the installer, and there are no pending Windows Updates.

Are there any Windows admin settings that might cause the installer to think a reboot is needed?

Thanks again!
Daniel

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Pending reboot loop, unable to install

Thu Oct 01, 2020 8:54 am

Hello,

We've added an improvement on our TODO list to log the reason why the reboot is required. What search or api call triggers the reboot required for the installer. Thank you for your suggestion.

We'll update this thread once this improvement will be available in Advnaced Installer.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”