/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (8)

Posted by: dunnpy 14 years ago
Red Belt
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
Posted by: AngelD 16 years ago
Red Belt
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.
Posted by: brettski 16 years ago
Purple Belt
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.
Posted by: jendres 15 years ago
Senior Yellow Belt
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
Posted by: brettski 15 years ago
Purple Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: murali.bhat 14 years ago
Purple Belt
0
Reopening this thread again...

Has any one found solution? How do I know if system is pending reboot?
Posted by: awingren 12 years ago
8th Degree Black Belt
0
The WhyReboot tool is awesome!! Thank you, dunnpy!!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ