A few words of thanks would be greatly appreciated.

Windows XP automatically logs off

Corruption of the computer system registry can lead to problems whilst logging in to a Windows XP operating system. Windows XP might automatically log off while verifying the username and password input during logon. The problem can be solved by changing the Connect Remote Registry for the values of explorer.exe and userinit.exe. The Windows XP installation CD may be required in case the two *.exe files go missing due to spywares or malwares. Making changes in the registry may only be done after backup of the registry has been made as incorrect settings in the Windows registry will lead to a system crash.


I've recently hit a snag: my Windows XP boots up as usual to the logon screen, but as soon as I input my password, Windows will play the log on sound and then just automatically log me off again. I've tried many times to get Windows to carry on running including booting from the CD and repair, but every attempt has been unsuccessful.

Is there another way? A friend of mine suggested trying to activate the guest account at the logon screen, but I have no knowledge of how and neither does he. Will this rectify the problem for now?
I am planning on getting a new PC soon, but need access to my user account as there are many important documents for my work on it as well as 10GB of music that I don't want to lose.


To solve this problem:
Edit these values and type the correct path of shell :

Shell = explorer.exe   

NOTE: these files may also be deleted by spywares. You may need to extract them using the Windows CD.

Steps for rectifying this problem:

Log on to a networked computer.

  • Run Regedit.exe
  • Point your cursor to
  • Select File > Connect Remote Registry
  • Type computer name (infected computer)
  • Navigate to the following location in registry of destination or infected computer
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon 

Edit these two values in right pane:

  • Change these two values to
    • Shell=explorer.exe
    • Userinit = x:\windows\system32\userinit.exe
  • Exit from Registry
  • Restart the infected computer.

You should be able to log on to the computer. If it does not work then go back steps and just copy or write the file userinit.exe

Worked successfully - 100 percent guaranteed.


Thanks to waqar for this tip on the forum.


A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Windows XP automatically logs off », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!