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.
- Stuck in Programming: Get The Solution From These 10 Best Websites
- Don't Let Your Geographical Location Be A Barrier In Your Success - Live Classes By GeeksforGeeks
- Creating a Dual Boot System with Linux and Windows
- Finding Connected Wi-Fi Password in a Windows System
- Automating File Movement on your system
- Windows 10 –Feel the Difference
- Useful CMD commands for daily use in Windows OS
- Wi-Fi Password of All Connected Networks in Windows/Linux
- Uninstall Linux completely from a PC with Windows
- Zip files in Windows
- Creating Python Virtual Environment in Windows and Linux
- IDE for Python programming on Windows
- How to mount windows drives in Ubuntu
- Setup GitLab Repository On Windows 10
- How To Use Bash Shell Natively On Windows 10
- Cross-platform Windows / Raspberry Pi project with C++, OpenCV and Gtk
- Autorun a Python script on windows startup
- Introduction and Installation of Heroku CLI on Windows machine
- Why Linux Hosting is Cheaper than Windows Hosting ?
- How to create a Folder without any name and icon in Windows OS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.