Note:
Landesk references Windows API to determine whether or not a Windows device needs a reboot. Having a Landesk agent installed on your device allows the device to present a Landesk reboot GUI if a reboot is pending and if your Landesk configuration allows the reboot prompt.
Issue
When performing tasks such as patch scans or repairs, the LDMS Agent is prompting that a reboot is required. This may occur every time a task is ran.
Cause
This is typically caused by the presence of one or more registry keys that indicate a Reboot is pending.
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager] "PendingFileRenameOperations"
- "C:\ProgramData\vulscan\vulscan.log" shows:
Pending file rename data is present. Reboot is needed.
- Vulscan Reboot Registry Key
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\landesk\managementsuite\WinClient\VulscanReboot ]
- "C:\ProgramData\vulscan\vulscan.log" shows:
Vulscan reboot key exists. Reboot is needed.
Any file modifications made by Landesk or by another installer that requires a reboot will populate values in the registry that must be cleared to alleviate the need for a system restart. If the Agent is not instructed to ignore these, it will prompt users every time vulscan runs as it first checks to see if there is a 'Reboot Required'.
Solution / Workaround
There are 3 ways to correct this issue.
Set Agent to Ignore the Reboot Keys
Additional Info: How to Manually Verify Agent's 'Repair if Reboot is Pending' Setting
This is the ideal solution. These keys are created when a task is unable to be performed in its entirety. Things such as file rename or deletions may not be able to occur while system resources are accessing them. When the machine reboots, it will release the locks on the files, and allow any residual effects to complete. This can be critical in situations such as installing new patches.
Set Agent to Ignore the Reboot Keys
- Open the Agent's Distribution and Patch settings.
- Navigate to Patch-only settings | Install/remove options.
- Click the check box that says Start repair even if Reboot is already pending.
- Click Save.
- The next time Vulscan runs, it will update its Distribution and Patch settings, and should ignore Reboot Keys if detected.
Note: If a reboot is pending for a prerequisite to the current task, the current task runs the risk of failing. Use this option with discretion
This option should be considered a last resort. Reboot registry keys are created because a task was unable to perform all file changes when it tried to do so. Deleting the registry key runs the risk of the final file changes never occuring. If a key needs to be manually removed for testing purposes, it is recommended to make a backup of the key first, and restore it to the registry after testing concludes so file changes may have the opportunity to run.
Additional Info: How to Manually Verify Agent's 'Repair if Reboot is Pending' Setting
In the event an agent does not appear to be behaving how its agent settings indicate it should (i.e. reboots when told to ignore them), the AgentBehavior .xml file can be checked.
- On the Core, locate the Agent's Distribution and Patch Setting, Right click and choose Properties.
- In the Properties, in the lower right corner locate the ID:
Example: ID: 96-CORE3_v428
- The ID value corresponds to an *.xml file that defines the Behavior for the Agent.
- Core - "C:\Program Files\LANDesk\ManagementSuite\ldlogon\AgentBehaviors\AgentBehavior_{ID}.xml"
- Agent - "C:\ProgramData\vulscan\AgentBehavior_{ID}.xml"
Example:
- Core - "C:\Program Files\LANDesk\ManagementSuite\ldlogon\AgentBehaviors\AgentBehavior_96-CORE3_v428.xml"
- Agent - "C:\ProgramData\vulscan\AgentBehavior_96-CORE3_v428.xml"
- Within the AgentBehavior_{ID}.xml file is an element called 'ignorePendingFileRename'.
- If this value is set to True, it will allow vulscan to perform tasks even if the Reboot Registry Keys are present.
- If this value is set to False, it will prompt the user about Reboots if the Reboot Registry Keys are present.
Example:
Start repair even if Reboot is already pending is CHECKED
<Name>ignorePendingFileRename</Name><Val>true</Val>
Start repair even if Reboot is already pending is UN-CHECKED
<Name>ignorePendingFileRename</Name><Val>false</Val>