Windows Automatically Logs Off – Login Log Off Loop Solution

by on February 25th, 2009

Ever had a problem when booting process of windows XP goes alright and welcome screen displays desktop wallpaper but with no icons just for few seconds. Then it logs off the user and the displays the log on screen. On clicking the user name the same thing happens again. Safe mode does not help to solve this issue. Repairing Windows will not help also because the system restarts when it says setup will complete in 30 or so min and setup resumes. Again the system will restarts at the same stage. This goes in loops and you can’t do anything. We have simple solution to that.

It is due to a virus attack or due to corruption of a system file or registry.

Solution 1: (System Corruption)

If the system registry or boot files are corrupted, then first you should try to repair Windows installation. Repair install of Windows will replace corrupted files with the default files found in the Windows Installation Disk. To repair Windows installation, boot with the Windows XP installation CD. When it says you want to setup Windows, press Enter. Then you have to agree to the License agreement by pressing F8. Then the process will search for existing installations of Windows. If it finds one, it’ll show you and ask whether you want to repair it or clean install a brand new Windows XP. Select to auto repair the existing Windows XP. It’ll go on with the repairing which is like installing new Windows. This will most likely solve the problem. If you are unable to do this method then proceed to the next solution.

Solution 2: (Virus Attacks)

The logon process is initiated by a file called userinit.exe which is located in System32 directory. If, by some means, it gets corrupted or it gets deleted, the user will not be able to logon. In this case you have to copy this file to your System32 directory again. To do this, boot with Windows installation CD or any other bootable CD (if you have userinit.exe with yourself) which gives access to the hard drive and copy the userinit.exe file back to system32.

The registry value of Userinit must also be directing to the correct path of userinit.exe. To see the Userinit value, go to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

In the right hand pane, find Userinit and make sure its value is pointing to the correct userinit.exe path. In my case, the path is:


If you don’t have a Windows Installation disk, just download the userinit.exe file from here:

Userinit File (12.4 KB)