Shutting down during update (0x8007045b)

The PC was shutting down or restarting while the update installed.

How to fix it

  1. Run the Windows Update troubleshooter: Settings > System > Troubleshoot > Other troubleshooters > Windows Update.
  2. Reset Windows Update: in Terminal (Admin) run net stop wuauserv and net stop bits , rename C:\Windows\SoftwareDistribution to SoftwareDistribution.old, then net start wuauserv and net start bits .
  3. Repair Windows files: open Terminal (Admin) and run DISM /Online /Cleanup-Image /RestoreHealth then sfc /scannow and restart.