Windows logs off automatically while login

Trouble:

We have been receiving mails from several readers that they are not able to login to Windows. As soon as they login, the windows show applying your settings, saving your settings and logs off automatically without logging in. This situation is really very troublesome and gets onto the nerves of a person who needs his computer badly for some important work.

The main reasons behind this problem is a corruption in the registry key which holds the value of the files which are executed while login to windows. This registry key can get either replaced with some incorrect value or it might get corrupt due to some virus / trojan activity. Lets see how to fix this issue.

Fix:

We need to remotely access the infected computer from another computer on same network. Then we need to correct the registry key for userinit under winlogon.
Lets see the steps one by one:

1. Connect the infected computer to a network which has at least one healthy computer connected. Power on both of the computers.
2. From the healthy computer, Go to Start > Run, type regedit.exe and press enter. This will launch the registry editor.
3. Go to File > Connect Network Registry, by using this infected computer’s name or IP address. For more details on this, see this link.

Remote registry editing

4. Locate this entry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\

5. At this entry there is a key names userinit, double click on the key and set its value to “C:\WINDOWS\System32\userinit.exe,“

Exit the registry editor, restart the infected computer. This is it. This will work for most of the computers.

 For those computers which still don’t let you login, you need to run a repair setup on such computers.To run a recovery setup, see this link.

Comments

  1. Thanks.. I was facing the same problem. I repaired my windows installation and it started working.
    But now the problem is appearing every time i restart the machine. please help me fix this problem.

  2. Dear friends

    my pc problem is solved it’s very helpfull site

    thank very much

  3. Dear friends

    i can solved that proble,but i am boot through ERD commander 2005 and edit registary.

  4. Dear Friends,

    I am able to connect to the Regedit of the infected PC through the network but was not able to open the HKEY_LOCAL_MACHINE & I was not allowed to open. Is there any other solution to recover the problem without reinstalling OS.

  5. I need to konw about the Windows Server 2003 server. the login window re-appears after giving credentials

  6. no idea your problem has been solve only reinstallation and update antivirus

  7. In most cases where replacing the userinit.exe does not work the reason is quite simple: You fooled around with your hard disk, changed the disk and/or controller. Now when you start Windows, just as you log in the operating system assigns its drive letters. However, due to a changed disk or controller, the drive letters don’t get assigned correctly. They may look right in the recovery console, but standard Windows (as well as Safe Mode) is a different story.
    Now you can replace userinit.exe as often as you want, it won’t help, because the file is not broken or corrupt, and not infected either. Windows just can’t find it, because it’s not looking for it on the right drive.

    To get this fixed, edit the registry of the system that always logs you off. There are many ways to do this from another system, google for it. There, find HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices , look for entries like \DosDevices\D: etc. Make sure the right drive letters are assigned there. You can do so by comparing this to the system as it was before you made the change (if you still have a backup). If you don’t know for sure which letter was assigned to your system drive, you may just have to try.
    Changing the entries works by right-clicking on them, selecting “rename” (in standard regedit) and changing \DosDevices\D: to \DosDevices\C:, for example.

    These microsoft articles may help as well, as they explain the issue:
    http://support.microsoft.com/kb/223188
    http://support.microsoft.com/kb/249321/

  8. Configure your computer to start from the CD-ROM drive. For more information about how to do this, refer to your computer’s documentation or contact your computer manufacturer. Then insert your Windows XP Setup CD, and restart your computer.
    1.
    When the Press any key to boot from CD message is displayed on your screen, press a key to start your computer from the Windows XP CD.
    2.
    Press ENTER when you see the message To setup Windows XP now, and then press ENTER displayed on the Welcome to Setup screen.
    3.
    Do not choose the option to press R to use the Recovery Console.
    4.
    In the Windows XP Licensing Agreement, press F8 to agree to the license agreement.
    5.
    Make sure that your current installation of Windows XP is selected in the box, and then press R to repair Windows XP.
    6.
    Follow the instructions on the screen to complete Setup.

  9. Hi this is Dinesh Here….

    In windows xp or other os we can not change some registry values through network.
    So in this case I have a solution…..

    Make a bootable cd of UBCD.
    Boot with that Cd and now you can change registry from here.

    Try and tell me if u get success….

  10. Hi guys. This is what i do.

    If u are sure its a virus thats the cause, then use bartpe or windows disk to copy the userinit file to your hard drive. Now here is the trick, after you copy RESTART YOUR PC ONLY IN SAFE MODE, then scan your pc in safe mode. If your system files are damaged, its time to re-install windows (in my case every windows program file was damaged, except for my own programs)

  11. hai,

    just now i configured the ip address but system is not communicating with other pc..
    we tally server & internet server…. ip address is 192.168.1.10 [Interenet] & 192.168.1.3 [tally server]
    when ping these two ip address i getting reply but i am not able to see ….
    but not getting reply from other pc’s except these two ip address.

    waiting for result plz solve my problme

  12. Hi guys,

    My problem is quite diferent , I have 3 users in my windows7 pc, out of that, usr1 and administrator are able to login , but user2 is unable to login . in this case what should I do to login by user2.
    and second question is if I want to access the user2’s internet expolore favorites.

    kindly reply me………..

    thanks
    a

  13. thanks to u guys … u guys rock man and thank you again for solving my problem HURRAY team TROUBLE FIXERS !!!!!!!

  14. My windows xp home edition sp3 on Dell mini inspiron, it log off immediately when i log on,
    and thats because of 24.01.2007 SURABAYA harmful virus, what’s the solution, is it possible that no one in the world can kick this virus and defeat it.
    thanks

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.