Hi,

I'm wondering if there is a global registry key or other flag available that can be used to determine if a PC is reboot pending? I've found this key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations", but it would only be set if the reboot was required for file renames. I'm concerned that if a reboot is required for some other reason and this would not be reflected in this key.

Thanks for any advice
Brett

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
0

I only think there exist two cases when an actual reboot is required; files in-use which PendingFileRenameOperations is there to handle and kernel services to be started or filterdrivers to be unloaded. I don't think there is any way to find out for the latter.

Answered 09/11/2008 by: AngelD
Red Belt

Please log in to comment
0

So in that case I should probably capture the exit code and create my own flag then. At least that way I know I'm going to capture all reboot requests.

Thanks for the quick response AngelD.

Answered 09/12/2008 by: brettski
Purple Belt

Please log in to comment
0

Just bringing up this again.

Does anyone know how to detect if a Group Policy deployment has a reboot pending?

For example, a workstation has 2 applications assigned to it.  The first application has a reboot trigger, but AD holds the reboots until the end of the deployment and so starts installing the second application.

How can I condition the second application so that it won't start while a reboot is pending?
Does anyone know how the GP installation tracks if a reboot is requested?

(Besides the file copy pending registry key, since a reboot request can be forcibly triggered by Windows Installer.)

Cheers,
Jeff

Answered 09/29/2009 by: jendres
Senior Yellow Belt

Please log in to comment
0
Sorry Jeff, I am using Task Sequences through SCCM, so can't help you out as I worked around the issue using wrapper scripts and Task Sequence Variables. Hopefully someone else here has a better idea how it works.
Answered 09/29/2009 by: brettski
Purple Belt

Please log in to comment
0

IIRC, MSIExec exits with an exit code of 3010 if a reboot is required. I haven't looked but perhaps there's a testable property for the WindowsInstaller.Installer object?

I would imagine GP performs its magic by looking at system messages via API calls.

Answered 09/30/2009 by: VBScab
Red Belt

Please log in to comment
0

Reopening this thread again...

Has any one found solution? How do I know if system is pending reboot?

Answered 09/16/2010 by: murali.bhat
Purple Belt

Please log in to comment
1

Try this tool - WhyReboot - it's free.

It will show you what is going on and why the system belives it requires a reboot.

Not exactly the answer for your issue, but should point you in the right direction.

Hope this helps,

Dunnpy

Answered 09/16/2010 by: dunnpy
Red Belt

Please log in to comment
0

The WhyReboot tool is awesome!!  Thank you, dunnpy!!

Answered 03/12/2012 by: awingren
Seventh Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity