Ooops, that’s not right…

I have been asked twice this week if this is possible and if so how to do it, so I guess either the information is not readily available on the Internet, or the two people who asked me just couldn’t be bothered to look it up...!

 

I’m sure you’ve seen the below screen appear during the first boot of your computer or server after you have installed any updates in Windows 7 or Windows Server 2008 R2, it’s the screen that says “Completing stage X of Y”.

  updating

It is during this phase that, amongst other tasks, any files that were in use while the update was being applied are now copied into their right place and updated once the computer was rebooted.  On very rare occasions you might one day see that the computer has gotten stuck at the above screen, and the configuring of the update(s) never completes.  This creates a dilemma because you want to get access to the console so that you can work out what went wrong, but this will require a hard reset of the computer.  However, on the screen in clear text it is telling you not to turn off your computer.

This issue might occur for several different reasons, which are way outside my field of expertise so I won’t try to explain them here.  Thankfully, there is a solution for Windows 7 and Windows Server 2008 R2 that permits you to rollback the changes made by all the updates you applied during the last update.  Simply use the below steps to recover your non-booting system:

  • Boot the computer into the Windows Recovery Environment (WinRE) by either using the installation media or pressing F8 during boot (WinRE is built in to OS installations now).
  • Open a command prompt.
  • Navigate to the \Windows folder that you wish to repair.
  • Run the command: DISM /image:DRIVE LETTER OF WINDOWS DRIVE\ /cleanup-image /revertpendingactions

           An example of this command might be: DISM /image:C:\ /cleanup-image /revertpendingactions

A message should then appear saying

           Reverting pending actions from the image....

           The operation completed.  Any revert of pending actions will be attempted after reboot.”

When you restart the computer you will now see a different screen, this time saying "Reverting pending actions".  Once this process has completed, any changes that the previous update(s) made should now be reversed and you should be able to log on correctly.