What are the error codes you get when the updates fail to install ?
Can you go Start - type cmd and right click on cmd and select Run as administrator - accept the UAC and enter sfc /scannow to see what that reports.
If reports it is unable to repair some files then copy & paste this command to the cmd prompt and press enter.
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > %userprofile%\Desktop\sfcdetails.txt
This will put an icon onto the desktop which when double clicked will open the CBS log in Notepad which you can then copy & paste into your reply box.
Go Start - type disk cleanup then right click on Disk Cleanup and select Run as administrator.
This will scan for any obsolete Windows Updates which could amount to a few GB - click on OK to delete the files it finds.
If you have any updates pending then see if they will download and install.
Sometimes these cmds can resolve update problems which are run from the admin cmd prompt.
Run the Command Prompt as you did before and you can copy & paste this next set of cmds which will auto run except for the last one where you will need to press enter - the SoftwareDistribution cmd will remove your update history but will not affect any installed updates.
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
Reboot the computer and do a manual check for updates if none are waiting to download.
The next tool to use is the System Update Readiness Tool (SURT).
This can take a while to get started and running but its log can be found in C:\Windows\Logs\CBS and double click on the Checksur one.
As you haven't said if you are using a 32 or 64 bit system, the first link is for the 32 bit version and the second is for the 64 bit version.
https://www.microsoft.com/en-us/download/details.aspx?id=3132https://www.microsoft.com/en-us/download/details.aspx?id=20858I don't know why the update repair is getting stuck but hopefully one of these suggestions will resolve the update problem.
If they don't then just run the Windows Update repair in the program again in Safe Mode.