This tutorial describes an unusual problem that may occur during Windows Server 2012 R2 Updates. This issue generally occurs while performing scheduled Windows Updates. Failure of one single update may keep you stuck you at the screen that says Updating your system, but will not move a single inch, even after hours of waiting with no progress. To overcome this challenge you can follow one of the methods popular among the system administrators. Here, we will see one of them.
1. Boot your server from Windows Server 2012 > click on Troubleshoot to enter in recovery mode console.
2. Run the following command to get a list of available drives:
wmic logicaldisk get name
3. The next step is to locate the drive that contains the windows directory. The easiest way to confirm is to check each drive for Windows directory by using “dir” command. Generally, Windows directory exists in the “C:” drive, however, if it’s located under different drive then simply replace “C:” with respective drive.
4. Navigate D:\Windows\WinSxS directory by using >> “cd Windows\Winsxs”
5. Check “pending.xml” file >> run “dir pending*” command
6. Now rename the “Pending” files to “_old” at the end of the file name >> enter “ren Pending.xml Pending_old.xml” command
7. Once you rename the “pending.xml” >> the next step is to create a new blank “Pending.xml” file by using: echo > pending.xml
8. Now navigate Windows directory
9. Create a new directory within Windows >> run “mkdir directoryname” where directory name can be a random choice by you. We will name the directory as scratch.
10. Use DISM (deployment image servicing and management) command. It will remove or revert all pending actions from the damaged image >> run below command:
DISM /Image: D:\ / Cleanup-Image / RevertPendingActions / scratchdir: D:\Windows\ scratch
11. Now rename the “SoftwareDistribution” folder to “SoftwareDistributionOLD” >> run below command:
Ren SoftwareDistribution SoftwareDistributionOLD
12. Run a system file checker tool to repair missing or corrupt kernel files by using the following command:
sfc /SCANNOW /OFFBOOTDIR=D:\ /OFFWINDIR=D:\Windows
13. Reboot the server
Note: If it is a virtual machine, make sure to take backup of “vhd” before making any changes on the server.
- Creating a Dual Boot System with Linux and Windows
- Stuck in Programming: Get The Solution From These 10 Best Websites
- How to use Emojis in Windows 10?
- Tricks in Windows 10 | Set -1
- Zip files in Windows
- IDE for Python programming on Windows
- Windows 10 –Feel the Difference
- Useful CMD commands for daily use in Windows OS
- Windows Shortcut Keys
- What is Security Audit For Windows?
- How to run Linux Commands on Windows 10?
- How to Install VirtualBox on Windows?
- Setup GitLab Repository On Windows 10
- Uninstall Linux completely from a PC with Windows
- How To Use Bash Shell Natively On Windows 10
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.