How to Fix a Windows Logon Loop

By Ken Burnside

Windows logon loops can usually be repaired with the installation CD.
i Digital Vision./Photodisc/Getty Images

When your Windows PC starts up, launches the Windows welcome screen, and then reboots repeatedly because of a incorrectly installed file, it's a frustrating experience. This behavior, called a logon loop or reboot loop, is usually the result of a bad shutdown – the PC was powered down during a shutdown process, or a file set by Windows Update was misapplied, and leaves the operating system repeatedly demanding a restart. Fortunately, Windows provides a few ways to solve the issue, ranging from automatic tools included on your rescue disk or Windows installation DVD down to editing the registry of the machine from within Safe Mode.

Automated Tools

Place your Windows installation DVD or your manufacturer's provided system recovery disk into your DVD drive. Reboot the machine.

Press any key to force your system to reboot from the DVD drive. You'll see a number of configuration screens, and eventually you'll see the Windows Setup screen. Click "Next" to start the Setup Wizard. If you're using your manufacturer's rescue disk, you may have a few different options, but they will eventually lead to the Windows Setup utility.

Select "Repair Your Computer," then "Troubleshoot" and then "Automatic Repair." Windows Automatic Repair will scan your system for errors while repairing them.

Reboot the machine when prompted – depending on what gets repaired, it's likely that it will reboot automatically. Log in to the machine normally.

Manual Repair With the Command Line Interface

Follow the procedures in the previous section. If Windows gives you a message of "Windows Cannot Repair This Computer Automatically," continue.

Click "View Advanced Options for System Recovery and Support," then select "Command Prompt" to open the Windows Command Prompt.

Type "C:" followed by pressing "Enter" at the prompt to switch over to the root level of your boot drive.

Switch directories by typing "cd \windows\system32\config\", then press "Enter."

Type "dir" followed by "Enter" to get a directory listing of your files.

Look for the following files and folders in that directory entry – folders are listed in all caps: RegBack, DEFAULT, SAM, SECURITY, SOFTWARE and SYSTEM.

Type "md recovery" and press "Enter" to create a new "RECOVERY" sub-folder in the C:\windows\system32\config directory.

Type "copy . recovery" and press "Enter" to copy all of the files in the directory you're in to the RECOVERY subfolder. If you get prompted about overwriting files, press "Y" to continue.

Type "cd regback" and press "Enter." Type "Dir" followed by "Enter." Look for the following entries: DEFAULT, SAM and SECURITY.

Type "copy . ..". Make sure you include the space after the second asterisk (*) and the two trailing periods. This command copies the contents of the RegBackup folder to the config folder above it in the directory hierarchy. If prompted about overwriting files, press "Y" to continue.

Type "Exit" once the files have been copied. You'll return to the "System Recovery Options" window. Click "Restart" and log in to Windows normally after the restart.


As a last attempt at resolving your problem without reinstalling Windows, you can download a Linux distribution that will boot off of a USB flash drive. You can navigate through the Windows file directory and attempt to delete the files in the pending.xml files. See the link in Resources for more information.


The information presented here is for Windows 7, Windows 8 and Windows 8.1. If you are using a different version of Windows, some details may have changed.