Windows Server 2008 - Prevent Error Recovery screen on next boot

I would like to be able to revert to a snapshot taken from a running Windows Server 2008 VM, and boot it up without seeing the Windows Error Recovery screen (Windows did not shut down successfully, choose between Safe Mode and Start Windows Normally).

In Windows Server 2003 it is possible to prevent the Windows Error Recovery screen by deleting the value LastAliveStamp in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability

Although this key does still exist in Windows Server 2008, deleting it does not have the same effect.

The accepted answer for this forum post indicates that the presence of the following items on a boot indicate that the previous shutdown was abnormal:

  • The LastAliveStamp registry value from above
  • The files lastalive0.dat and lastalive1.dat in C:\Windows\ServiceProfiles\LocalService\AppData\Local

My approach so far has been to remove all of the above before taking the snapshot so that on the next boot it looks like Windows was shut down correctly.

I have tried deleting the files and the registry key before taking the snapshot, but when I revert to the snapshot and power on the VM I still see the Error Recovery screen.

I have been trying this with both Windows Server 2008 and Windows Server 2008 R2, if they each require a different solution for this I am interested in knowing them both.

Does anyone have any suggestions on how I might accomplish this, or other things I can try?


bcdedit works for this on win 7 ultimate (must be run with UAC off or in a cmd prompt with administrative priv's):

bcdedit /set {current} bootstatuspolicy ignoreallfailures

To restore original settings:

bcdedit /set {default} bootstatuspolicy displayallfailures

Description:

Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings. The objects and elements in the store effectively replace Boot.ini.

BCDEdit is a command-line tool for managing BCD stores. It can be used for a variety of purposes, including creating new stores, modifying existing stores, adding boot menu options, and so on.

Sources & Further reading:

  • Reference Sheet (most thorough reference @ 29 pages): BCDEDIT Reference (.doc)
  • BCD FAQ: http://technet.microsoft.com/en-us/library/cc721886(WS.10).aspx#BKMK_bcdedit
  • BCDEdit Command-Line Options (not as good as the .doc reference above): http://technet.microsoft.com/en-us/library/cc709667(WS.10).aspx

EDIT: Confirmed this tool is compatible with Server 2008 here