Windows Log on and Log off immediately.

You may face this problem when logging on to Windows. When you type user name and password you are again presented with User name and Password dialogue box. You try hard to get in but to no avail.

You may not be able to log on to system using either Normal Mode or Safe Mode. This occur only when Winlogon service tries to load the Windows default shell (explorer.exe) and user shell (userinit.exe) from registry. This service searches for Explorer.exe and Userinit.exe in the following path of registry:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Edit these values and type the correct path of shell :

            Shell = explorer.exe

            Userinit=X:\windows\system32\userinit.exe

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

Steps for rectifying this problem:

  • Log on to a networked computer.
  • Run Regedit.exe
  • Point your cursor to HKEY_LOCAL_MACHINE
  • 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:

                  Shell

                  Userinit

  • Change these two values to

                  Shell=explorer.exe

                  Userinit = x:\windows\system32\userinit.exe

  • Exit from Registry
  • Restart Infected computer.
  • You should be able to log on to computer.

17 thoughts on “Windows Log on and Log off immediately.”

  1. I have windows 2003 server in my notebook with SAP installed in it.I dont want to loose SAP from it.Can you please tell me whether i have to do this process with windows cd in it ? or i can do without windows cd.

    Note : i have windows XP not windows server 2003

    Please help me

  2. Thank You,
    I have the same problem and I did exactly what you say, but i did not solve the problem.
    What can I do?

  3. These instructions, as several users have alluded to, do not work. Any other ideas that would be helpful. The situation is the fix you suggested did not work.

  4. The solution does not work…I followed the steps until Connect Network Registry then after that cannot connect to the infected computer. The Registry Editor say must BOTH computer on the registry service. How can?! One of them cannot log on wad…

  5. The solution requires that you enable the remote registry on both the computers. If infected computer doesn’t have the remote registry enabled then you can enable using the Recovery Console. In Recovery Console, you need to enable the service for the Remote Registry.

    Have a look at the below URL to enable/disable any service in the Recovery Console:
    http://www.windowsnetworking.com/kbase/WindowsTips/Windows2003/AdminTips/Admin/DisablingServicesinRecoveryConsole.html

    Nirmal.

  6. I just copyed userinit.exe off of my working computer to my broken computer. In fact the broken system was missing the userinit.exe file altogether.

    I first copied the c:\windows\system32\userinit.exe file from a working system with the same OS to a USB jump disk.

    I then unplugged the USB jump disk and plugged it into the broken system. I then booted the system with a windows install CD. (you have to have the USB jump disk plugged in while the system is booting – that way windows will load the driver for the USB jump disk.)

    I then Select “R” for recovery console

    Then it will ask for the drive letter of the system to log into. (In my case it was #1 C:)

    For enter nothing for the admin password.

    Next type dir “Drive-Letter”. Replace “Driver-Letter” with the USB jump-disk letter. What I did was to start at D: and work my way up until the screen spit out the contents of the jump-disk; which was F:

    Next do “cd C:\windows\system32”

    then copy the file “copy f:\userinit.exe .”

    then “exit” to reboot the system.

    hope this helps

  7. i have same probelm with windows server 2003(Domain controller) . but your solution dosnt solve it. plz help me with cd. give me soulation for repair by cd.

  8. Perform Time,business dog bedroom gun high existing minister pick touch support realize threaten survive confidence formal student vote examine instrument estate worker pound chance thus way wind no-one need feel material apparently public later answer proposal selection visit create respect certainly summer foundation would teach prison affair section relationship rare commitment board argue gentleman chief freedom size herself point beautiful relate trial lean interested up which medical and cause studio may neighbour improve limit front operate flat speaker criticism alright imagine different bank model rapidly live opposition

  9. Ok it worked the path in the registry changed on the userinit.exe value but do note I copied the *.exe files from the \windows\servicepack directory to the \windows\system32 directory
    If its not a file problem being corrupted its probaby the registy settings its got to be close in that

    Thank you

Leave a Reply to No Time Cancel reply

Your email address will not be published. Required fields are marked *