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
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)
Please log in to answer
Posted by:
GillySpy
13 years ago
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.
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:
rmeyer
13 years ago
I have this as a custom software inventory item:
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
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
13 years ago
Posted by:
snissen
13 years ago
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:
nbs
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.