/build/static/layout/Breadcrumb_cap_w.png

Detecting if PC needs reboot

Is there anyway to have a custom field report Yes or No depending on value of;

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations

According to MS if the PC requires a restart before any other software can be installed it will set a reg value of PendingFileRenameOperations to anything but 0, what I would like is a custom field saying Yes or No if the PC needs a reboot at point of inventory.

Thanks

0 Comments   [ + ] Show comments

Answers (5)

Posted by: rmeyer 12 years ago
Second Degree Blue Belt
1
I have this as a custom software inventory item:

RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations,TEXT)
AND
RegistryValueEquals(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations,System.String[])


If it shows in the custom inventory then it have a pending reboot, if not it doesn't =)

Then you can make a smart label that show if it have the "System.String[]" value then list it as "need reboot" or something
Posted by: scottlutz 12 years ago
Orange Senior Belt
0
You could by creating a manual software inventory record, and using a custom inventory rule to check the value of this key. If the "software" is on a machine, you know it needs a reboot.

Click on the ? box next to Custom Inventory Rule section and you will see the various syntax
Posted by: snissen 12 years ago
Fourth Degree Green Belt
0
If it would help, there's a free SysInternals utility that checks exactly that registry key, and writes a list to stdout: PendMoves
Posted by: GillySpy 12 years ago
7th Degree Black Belt
0
nbs are you wanting something to show in inventory? If so how, with a yes or a no?
What action are you going to take with it?

Remember that a CI is based when the inventory was gathered for that machine, but if it has rebooted and not provided a new inventory then that value is out of date and you may not want to reboot it anymore.

Say, if you were going to use a script to reboot it then you may want to use a verify step in your script's tasks to check that value first.
Posted by: nbs 12 years ago
Orange Belt
-1
RegistryValueReturn(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations,TEXT) AND RegistryValueEquals(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations,System.String[])

Thanks Rmeyer, this worked fine.
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