Helpful tips and tricks to cleaning your Windows XP/Vista/7 system (mostly windows XP)

Tuesday, February 2, 2010

Windows logs me in and then out right away!

While removing a virus from a system I had this happen, it would happen no matter what account I used or if it was in safe mode. The only catch is to fix this you will need a windows vista or windows 7 bootable dvd, or the ability to connect the hard drive to another system.

Once you are in windows and you can access the drive, open up regedit and just highlight HKEY_LOCAL_MACHINE. Go to File - Load Hive. Navigate to the broken system drive:

c:\windows\system32\config\software

Open that and when it asks for a name just put temp.

Now you can expand temp and edit the registry. Go to:

HKEY_LOCAL_MACHINE\temp\Microsoft\Windows NT\CurrentVersion\Winlogon

Look for the value for UserInit, it should = C:\WINDOWS\SYSTEM32\userinit.exe

If it isn't set to that, then change it. You should also do a reality check and make sure userinit.exe exists in that path (maybe the virus infected or deleted it).

Reboot and see what happens.