Skip to main content

Anybody know what logic determines this "Restart Pending" warning when you run any of the setup installers?  I don't get it.  I get this message immediately after restarting, even on my own PC.  I don't have any scheduling on my PC for restarts so I don't get what is causing this.  We get it on our servers too.  It's really annoying because at the end of the setup during the configuration analysis you get another message that says you should restart and run the analysis again after.

 

10965iF3116E19B7C5FBF0.jpg

Hi Victoria,


 


Just curious if there is any warning message at the end of Configuration Analysis (while everything else was green). You might have to review the trace log to find out this one.


 



Not quite what you posted but similar.  This is what I get at the end that I mentioned in my original post.  Why do you ask?  This was taken from my local machine installing client tools only but, as I said, I get it on servers as well.

 


I haven't asked installer team to get 100% exact answer what K2 Setup Manager checks to flag this warning, but there are not so many things to check in base OS (Windows server or client) for pending restart: Windows updates notifications or  pending operations on files and directories that Windows has scheduled for renaming, moving, or deleting at the next reboot.


Windows update notifications can be examined by looking at the files pending.xml and reboot.xml located in "C:WindowsWinSxS" directory. And you can check pending file and folders operations by examining respective registry section: 


HKLMSYSTEMCurrentControlSetControlSession ManagerPendingFileRenameOperations


 


For example I just run into this issue of pending restart in the beginning of installation on my test VM where Automatic Windows Updates are disabled and I know that there were no previous installations of other sofware or updates performed manually, so warning seems to be strange.  I check all above mentioned locations to check which operation is scheduled to be performed during restart cycle. I immediately noticed that reboot.xml contains some registry change operation which required reboot:


 



 


But this file hasn't been changed after reboot whereas restart pending warning disappeared. I did a bit more googling and found additional registry keys to check for pending reboot status:



So I belive setup manager checks some of above mentioned locations and what exact cause in each particular case can be verified by examining them. It is possible to compose some script to quickly check on all the relevant registry keys (e.g. with use of "reg query" command).


Neither of those xmls are located in C:WindowsWinSxS for me.

Nor do I have a key for PendingFileRenameOperations under HKLMSYSTEMCurrentControlSetControlSession Manager, and

RebootRequired under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateAuto Update.

 

I wasn't sure what to check for your last two points...


@Victoria,


 


I believe that for Component-Based Servicing pending reboot status check you need to look at the following registry key:


HKLM:SoftwareMicrosoftWindowsCurrentVersionComponent Based ServicingRebootPending


Next, WMI: CCM_ClientUtilities (System Center Configuration Manager clients only) - is applicable only in case your server(s) is under SSCM (System Center Configuration Manager) management.


 


There is a nice PowerShell script available on GitHub which checks all the relevant locations (Test-RebootRequired.ps1):


https://gist.github.com/altrive/5329377


 


HTH,


Mikhail


I don't have that registry key either.

I ran the powershell and it didn't do anything so I guess that means I don't have a restart pending?


Well this script is actually a function which will return true if it detects any pending reboot indicators, of false if none of those detected. Here is an outline of how you can use it (apart from incorporating it into a larger script):



  1. Place this script (.ps1 file) into your PowerShell script root directory (this is available starting from POSH v3) - this will enable you to use dot sourcing. You may use $PSScriptRoot variable to confirm, but by default it is set to "C:Users%username%". So place this script into this folder.

  2. Use import-module commandlet to import your function using "dot sourcing": Import-Module .Test-RebootRequired.ps1

  3. Run function by typing in its name: Test-RebootRequired


So it should look approximately like this:



 


So if this function returns False you don't have pending reboot and K2 Setup Manager should not give you any warning too. But if you have False returned by this function, but K2 Setup Manager still flags pending reboot warning - let me know and I'll try to research this further.


Just wanted to share an interesting observation about this warning - we olny have it in blackpearl setup it seems, and for smartforms setup it seems that there is no such warning/check (just noticed this with 4.7). IMO it is really good that with K2 Five we've got truly unified installer - we do all the checks there and also exclude chance of not installing some parts of product by mistake, which was quite frequent problem at the time when we have 4 separate installers (blackpearl, forms, controlpack, K2 for SP)


Reply