Windows Update Error 0x8007012f







Sometimes while trying to install a new Windows update, an error happens such as Windows Update Error 0x8007012f
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform software installations tasks.

In this context, we will learn the methods  to fix Windows Update Error 0x8007012f and its causes.

Nature of Windows Update Error 0x8007012f?

The Windows Update Error 0x8007012f on Windows 10 PC can trigger whenever we try to install any kind of Windows update (including apps, system and feature updates).

When this error occur, you will see a message such as:

There were some problems installing updates, but we’ll try again later. If you keep seeing this and want to search the web or contact support for information, this may help: (0x8007012F). The operation has failed The file cannot be opened because it is in the process of being deleted. Error code: 0x8007012F


[Are you facing this Windows error? Our Support team can help you today.]


What triggers Windows Update Error 0x8007012f?

The following factors cause this error;

i. Poor internet connection:
If we have poor internet connection, the download will not be complete and files might get corrupt.

ii. Presence of malware.
iii. Firewall or security:
These security features manage incoming traffic to our computer and they filter what is coming in. If they are overprotective, we might encounter issues when downloading the updates.

iv. Old installer files:
A major reason can be the old installer files present on computer. The update might get interrupted at some point and if we download another copy of the installer files without completely deleting the old files, Windows Update does not recognize the new files. Unless we remove the old downloads first we will get the error.

Now, let us focus on some of the solutions our Support experts applied to fix this issue.

Steps to fix Windows Update Error 0x8007012f?

Generally, to troubleshoot this issue, you need to switch to a different internet connection. If we cannot connect via a cable we move our computer or laptop in the same room as the router/modem.

Start by scanning for malware and get rid of junk files. Not only will this remove nasty elements from computer, it will also be making more space for the download..

Then, you should reboot our computer. Starting with a fresh system helps eliminate temporary glitches that might be getting in the way of the update process.

[Are you Still facing this error? Do not worry. Follow these easy solutions provided by our Support Technicians.]


How to run the Windows Update Troubleshooter?

Follow the following steps;

i. Press Win + I to open the Settings window.
ii. Click on Update & Security.
iii. Then, select the Troubleshoot option on the left side of the panel.
iv. Now, go to the right side of the window, scroll down and click on Additional troubleshooters.
v. In the next window, under the Get up and running section, click on Windows Update.
vi. Then click on Run the troubleshooter button below it.
vi. Now, let the troubleshooter run and detect the issues. If any issues found, it will fix them automatically.

How to delete Contents SoftwareDistribution and catroot2?

We need to boot our PC into safe mode to be able to delete the contents in the SoftwareDistribution folder. Then follow the process below;

i. Right-click on Start menu and select Run
ii. Type msconfig in the Run command and hit Enter.
iii. Then, In the System Configuration window, click on the Boot tab.
iv. Check the box next to Safe boot.
v. If we need to use the internet while in Safe Mode, select the radio button next to Network.
vi. Press Apply and then OK to save the changes.
vii. Now, every time we turn on your PC, it will boot into Safe Mode. we can also undo the changes later on.
viii. Now, right-click on Start menu and select File Explorer.
ix. Copy and paste the below path in the File Explorer address bar and hit Enter:

    C:\Windows\SoftwareDistribution

x. Now, press Ctrl + A to select all the folder contents and hit Delete.
xi. Now, we need to reset the catroot2 folder.
For this, go to Start and type Command Prompt in the Windows search bar.
xii. Right-click on the result and select Run as administrator to open Command Prompt in elevated mode.
xiii. Now, type the below commands one by one in the Command Prompt (admin) window and hit Enter after each command:

net stop cryptsvc
md %systemroot%\system32\catroot2.oldxcopy %systemroot%\system32\catroot2 %systemroot%\system32\catroot2.old /s


We can now delete all the contents in the catroot2 folder.

Now, type the below command in the Command Prompt (admin) window and hit Enter:

net start cryptsvc

Reboot PC, start Windows Update again and the catroot2 folder should be reset.

How to Clear Pending.xml File?

Press Win + R to open the Run command.
Type cmd and press Ctrl + Shift + Enter keys in order to open the Command Prompt in admin mode.
In the Command Prompt (admin) window, run the below command and hit Enter:

Ren c:\windows\winsxs\pending.xml pending.old

This will rename the pending.xml file to pending.old.


How to Clear the BITS Queue?

For this, go to Start and type cmd in the Windows search bar.
Now, right-click on the result (Command Prompt) and select Run as administrator to open Command Prompt with Admin rights.
In the Command Prompt (admin) window, write the below command and hit Enter:

bitsadmin.exe /reset /allusers

How to Run BITS Troubleshooter?

BITS (Background Intelligence Transfer Service) facilitates download, transfer, or uploading of files to and fro a client and a server. It then offers the progress report of the transfers. But, before you proceed using the BITS troubleshooter, make sure that you re-start the Background Intelligence Transfer Service.

1. Right-click on Start menu and click on Run to open the Run command.
2. In the Run command search field, type services.msc and hit Enter to open the Service manager window.
3. In the Services window, go to the right side and under thee Names column, look for Background Intelligence Transfer Service.
4. If it is Stopped, right-click on it and select Start.
5. If it is Started, then right-click on the service and select Restart.
6. Now, right-click on the service and select Properties.
7. Then, under the General tab, go to the Startup type field and set it to Manual.
8. Press Apply and then OK to save the changes and exit.

Now, proceed with the BITS trouble shooting:
i. Click on the below link to download the Background Intelligence Transfer Service Troubleshooter:

http://aka.ms/diag_bits10

ii. Now, launch the troubleshooter and click on Advanced at the bottom.
iii. Then, uncheck the box next to Apply repairs automatically and click on Next.
iv. It will start detecting problems. Once it completes the scan, it will display a list of possible causes for the issue.
v. Click on Next to proceed with the fix.
vi. Now, reboot PC and the Windows Update error 0x8007012f should be gone.

How to Run the SFC Tool?

The System File Checker is a built-in utility to scan, repair, or restore corrupted system files on Windows 10.
If the Windows 10 error 0x8007012F triggers by corrupt installation files or Windows Update service, running this tool should fix it.
To run this tool, open Command Prompt with administrator privileges, and enter the command:

sfc /scannow


If the SFC tool does not work, we need to run a deeper scan using Deployment Image Servicing and Management or DISM tool. It works just like SFC, just that the scope of the scan is bigger and deeper.
The commands we use for DISM include:

DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth


We let the tool run its course because it will automatically try to repair any corrupted files detected during the scan.

How to Reset Windows Update Service?

Since this error is caused mostly by old download files, we need to reset the Windows Update components and rename the download folder to something else, so as to create a new Windows Update folder.
By renaming the old folder, the computer will no longer recognize it and will instead refer to the fresh folder.

To do this:
i. Open Command Prompt and run it as an admin.
ii. In the console window, type the following commands:

net stop bits
net stop wuauserv

iii. Next, enter the following command to delete the qmgr*.dat files:

Del “%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat”


iv. Press Enter to execute.
v. Rename the Software Distribution folder using the following commands:

Ren %systemroot%\SoftwareDistribution\DataStore *.bak
Ren %systemroot%\SoftwareDistribution\Download *.bak
Ren %systemroot%\system32\catroot2 *.bak

vi. Then, reset the BITS service as well as the Windows Update service to their default security descriptor using the commands below:

sc.exe sdset bits
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

vii. Next, type in the following command to open the System 32 folder:

cd /d %windir%\system32

viii. You need to re-register the Windows Update components using these commands:

regsvr32.exe atl.dll
regsvr32.exe urlmon.dll
regsvr32.exe mshtml.dll
regsvr32.exe shdocvw.dll
regsvr32.exe browseui.dll
regsvr32.exe jscript.dll
regsvr32.exe vbscript.dll
regsvr32.exe msxml.dll
regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll
regsvr32.exe actxprxy.dll
regsvr32.exe softpub.dll
regsvr32.exe wintrust.dll
regsvr32.exe dssenh.dll
regsvr32.exe rsaenh.dll
regsvr32.exe gpkcsp.dll
regsvr32.exe sccbase.dll
regsvr32.exe slbcsp.dll
regsvr32.exe cryptdlg.dll
regsvr32.exe oleaut32.dll
regsvr32.exe ole32.dll
regsvr32.exe shell32.dll
regsvr32.exe initpki.dll
regsvr32.exe wuapi.dll
regsvr32.exe wuaueng.dll
regsvr32.exe wuaueng1.dll
regsvr32.exe wucltui.dll
regsvr32.exe wups.dll
regsvr32.exe wups2.dll
regsvr32.exe wuweb.dll
regsvr32.exe qmgr.dll
regsvr32.exe qmgrprxy.dll
regsvr32.exe wucltux.dll
regsvr32.exe muweb.dll
regsvr32.exe wuwebv.dll

ix. Reset Winsock using this line:

netsh winsock reset

x. Set the proxy settings as well:

proxycfg.exe -d

xi. Restart Windows Update using these commands:

net start bits
net start wuauserv

Usually, the last option is to do a clean install of Windows 10, unless the given steps do not help. It may mean more work, but it will resolve any Windows Update we might be having.

This is actually necessary if we encounter the Windows Update Error 0x8007012f for every update we want to install. Generally, if the issue is not too serious, the solutions above should help in some way.

[Looking for additional support to fix windows errors? We are available to help you today!]


Conclusion

This article will guide you on how to fix Windows Update Error 0x8007012f which occurs when you try to install any kind of Windows update.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com



Related Posts






Focus on your business, not your servers.

Click Here to Learn More






Recent Post