The
80240020 error happens usually when the Windows 10 files that you downloaded was not complete and the setup process still tried to do the upgrade to Windows 10. Or it could be that your Windows 10 installation folder is unfinished or corrupted.

Luckily, this is an easy question to solve. Please follow the steps below to get this problem fixed.
Step One
1) Navigate to
C:\$Windows.~BT folder. If you cannot see this folder, please make sure that you have checked the hidden items.

Delete as many files in this folder as you can. You might not be able to delete all the files due to permission issues.
2) Navigate to
C:\Windows\SoftwareDistribution\Download and delete all the files in this folder.
Please note that you don’t have to delete
Download folder, but rather, you need to delete the content in it.

3) Type
cmd.exe in the search box in
Start panel and right click the option
cmd and choose
Run as administrator.

Click
Yes at this prompt.

4) Type
wuauclt.exe/updatenow and hit
Enter key.
Step Two
Warning: Before you proceed with this step, please make sure that you have back up your registry first just in case any irreversible errors happen. Refer to this post to see
how to backup and restore your registry.
1) Press
Windows key and
R at the same time, then type in
regedit and hit
Enter. When prompted for administrator permission, click
Yes to continue.

2) Then follow the path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade

3) On the right side of the pane, right click on the blank spot and select
New > DWORD (32-bit) Value.

4) Rename the value to
AllowOSUpgrade. Then double click the value and set the
Value data to
1. Then click
OK to save the change.

Your Windows Update panel should come out in a couple of seconds. If it won’t open automatically, you can open this panel from Control Panel manually. Then, you should be able to download your Windows 10 from scratch.
The steps above also work if you are having a
80080080 or 8024600A error code. Usually the error is common with Windows 8.1 users, but for those who are using Windows 7, this solution applies as well.
If the problem still persists, please be patient, Windows update takes time to download the upgrades in the background.
If you still could not get this problem fixed, your Windows update tool might be corrupted so the security settings and background process is now malfunctioned. In this case, it is suggested that you burn the DVD or CD or USB flash drive with Windows 10 ISO files in to do the clean install from scratch. If you want to know how to do it, please refer to
this post here for more information.