How to determine if a PC is reboot pending
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
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
[ - ] Hide Comments

so that the conversation will remain readable.
Answer this question
or Comment on this question for clarity
Answers
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.
Please log in to comment
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
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
Please log in to comment
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.
I would imagine GP performs its magic by looking at system messages via API calls.
Please log in to comment
Reopening this thread again...
Has any one found solution? How do I know if system is pending reboot?
Has any one found solution? How do I know if system is pending reboot?
Please log in to comment
Comments