What to do if Windows keeps asking you to restart your computer (Pending Restart)?

!Sometimes users encounter a situation where Windows constantly asks to reboot the computer.

This can happen if there is a failure during the installation of any service pack.

To solve this problem, follow our instructions.

To stop Pending Restart in Windows 11, just follow the next steps:

  1. First, you need to check if there are packages that require a reboot (with the Pending Reboot status).

    To do this, run PowerShell with administrator rights and run

    dism /online /get-packages /format:table | Select-String "Pending"

    or Get-WindowsPackage -Online | Where-Object { $_.PackageState -like '*Pending*' }.

    If the packages that require a reboot do not change their status after the reboot, you will need to cancel them manually.

  2. To do this, you will need to reboot the computer in the Windows recovery environment with the command shutdown /f /r /o /t 0 or boot using a third-party LiveCD.

    In this mode, you need to run the command DISM /image:C:\ /ScratchDir:C: /cleanup-image /RevertPendingActions

  3. If this does not help, perform the deletions using the following commands:

    del C:\Windows\WinSxS\pending.xml

    del C:\Windows\WinSxS\cleanup.xml - the file may be missing

    del C:\Windows\SoftwareDistribution\Download\*.* - will clear the cache of downloaded updates.

  4. Then run the registry editor and load the registry hive C:\WINDOWS\system32\config\Software from disk.

    In the branch HKLM\SYSTEM\CurrentControlSet\Control\Session Manager, you should delete the parameter PendingFileRenameOperations.

    After that, you will need to save the changes to the file by unloading the registry hive File -> Unload hive, and reboot your computer.

  5. At the end of the procedure, check that the updates waiting to be installed have disappeared from the list.

    Also, be sure to check the integrity of the Windows image and fix the system files using the commands in PowerShell:

    DISM /Online /Cleanup-Image /RestoreHealth

    sfc /scannow.

Don't hesitate to contact us if you have any questions!

  Ask Question

Read More

Got Something To Say?

Your email address will not be published.