Windows XP Logs Off As Soon As I Log In

I have an issue with a PC on my domain.  Windows XP Pro SP3.  When I login - it logs right back off.  I have researched the knowledge base and followed the suggestions with no results.

1:  I connected to the registry via the network and looked for key corruption in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\.
Key "userinit" was set to C:\WINDOWS\System32\userinit.exe,
2:  Did a repair install.

I still have the problem.
Normally I would just wipe it and reimage, but this laptop belongs to the CFO and it would take days to rebuild.

Any help would be appriciated,

Who is Participating?
Hi, did you do the repair console and replace C:\WINDOWS\System32\userinit.exe ?

doesn't matter if it was set to x:\ or C:\ it is probably corrupt.

Do this:

Enter the Recovery Console
Boot the system using the Windows XP CD-ROM. In the first screen when the Setup begins, read the instructions press "R" (in the first screen) enter the Recovery Console. Type-in the built-in Administrator password to enter the Console. You'll see the prompt reading C:\Windows (Or any other drive-letter where you've installed XP)
Type the following command and press Enter.
cd system32
rename userinit.exe userinit.old
expand d:\i386\userinit.ex_ .
 ***It will expand over to System32**
You can also try to copy this file from a known working computer by placing the drive in another computer.
(D is your the letter of your CD ROM drive and there is a dot at the end there after a space)

Quit Recovery Console by typing EXIT and restart Windows.

Now, ensure the USERINIT value in the registry and change it accordingly.

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ WindowsNT \ CurrentVersion \ Winlogon
In the right-pane, change the value of Userinit to "C:\WINDOWS\system32\userinit.exe

Are you sure this is not due to a virus, I had a similar experience not long ago, some virus and spyware,

After running the antivirus and malarebytes pc wouldn't log in.

I was able to run a reinstall repair without wiping anything.

if the laptop has sp3 already you may want to make a cd with sp3 using nlite otherwise you may run into some issues
RSchalhoubAuthor Commented:
The laptop had Antivirus 2009 on it, which I got off with Malwarebytes.  The problem started after that.  I did do a reinstall repair, but the problem still remains.
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Similaro problem I had, did you do a reintall repair with a XP CD with SP3 on it ?

Di yu try to log in in to the laptop locally?

Try the following

1. Download Avast! Anti-Virus and CCleaner. You can get them from and
2. Install CCleaner
3. Boot into Safe Mode with Networking (F8 on startup) and install Avast!. Update Avast!. (It will say it can't run on a computer with Symantec. Click OK on this message, we will be scanning out of windows so there won't be any conflict during the scan. Just remember to uninstall Avast! once you are finished with it.
4. Run CCleaner. This will delete all temp files from the system.
5. Schedual a Boot Time Scan with Avast!
6. Unplug the computer from the network
7. Restart

Avast! is the only anti virus software that I know of that can do a virus scan out side of windows. I use it regulary on my client's comptuers and have had great luck with it.

Once the Boot Time Scan is finished I would:

8. Put a Windows XP CD in the drive and run SFC /Scannow from the run command (Start -> Run) This will scan all windows system files and replace any that are corroupt.
9. Plug the computer back into the network
10. For good measure download Malware Bytes from and scan for spyware.
11. Restart as nessary
12. Uninstall any unnessary software (Avast, CCleaner, Malwarebytes)

DonNetwork AdministratorCommented:
follow this article
Windows XP Login Logout Loop (Virus)
What perry says makes a lot of sense but sometimes with this problem you can not even login on safe mode, it will just login and logoff right away.

You can boot to the recovery console and try do a file system scan

good luck
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.