Windows Hangs at Preparing Your Desktop or Windows Hangs Before Logon

Contents

1. Symptoms of the problem

Windows boot process hangs at "Preparing Your Desktop" before logon screen.

Screenshot of this problem for Windows 7:

Windows 7 Hangs at Preparing Your Desktop

Screenshot of this problem for Windows Vista:

Windows Vista Hangs at Preparing Your Desktop

Screenshot of this problem for Windows XP:

Windows XP Hangs Before Logon Screen

2. Reason why Windows might hang at Preparing Your Desktop

There's a database of mounted partitions in Windows Registry. For each drive letter such as C: or D: there's an entry describing physical location of that disk volume.

When Windows boots normally, that database of mounted partitions can be managed from Control Panel -> Administative Tools -> Computer Management -> Disk Management. Nevertheless entry for disk C: (system partition) usually can't be managed. It's set once and forever during Windows installation.

When disk C: no longer mounts, or corresponding entry is missing from database of mounted partitions in Windows Registry, Windows boot will hang at "Preparing Your Desktop". Moving partitions with GParted or Partition Magic, cloning and restoring of disk images with Acronis and other similar tools, upgrading disk drivers or enabling RAID configuration may trigger this error.

3. How to fix this problem

1) Download EBCD and burn it to CD/DVD according to the instructions, then set up your BIOS to boot from CD. You need full EBCD version to actually write changes to the disk, but it's recommended to try demo version first to make sure  there are no hardware incompatibilities.

2) Boot EBCD:

Using EBCD to fix Windows Hanging at Preparing Your Desktop - Main Menu

3) Choose Mount & Boot Center in the main menu, wait while it loads:

Using EBCD to fix Windows Hanging at Preparing Your Desktop - Starting Mount and Boot Center

4) Make sure Mount & Boot Center looks like below (system partition that should be mounted as "C:" isn't mounted as "C:"):

Using EBCD to fix Windows Hanging at Preparing Your Desktop - Initial Screenshot of Mount and Boot Center

5) Set proper mount path for system partition. It's always "C:" for Windows 7 and Vista, and it's usually "C:" but may be different for Windows XP. If unsure, run EBCD Registry Editor and check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\BootDir:REG_SZ.

Using EBCD to fix Windows Hanging at Preparing Your Desktop - Final Screenshot of Mount and Boot Center

6) Click OK to close Mount & Boot Center (changes will be commited to disk at this point), then choose "Reboot" in EBCD main menu:

Using EBCD to fix Windows Hanging at Preparing Your Desktop - Boot Loader is Restored, Rebooting