Sunday, October 25, 2009

Windows XP Login then Logoff! (Solved)

Remember my last post about Windows XP login and immediately logged off?

Finally I solved it after 2 weeks of troubleshooting. *Sigh*
The solution is simple, just finding it was the hard part.

I've done all the advice given in most pages I've found.
That is creating/copying a new set of userinit.exe from the recovery CD to windows\system32\ folder.
Most people manage to solve their login/logout problem after doing this.

But I can't. I need an extra step which is editing my registry.
Caution!!!
Registry editing is dangerous. Make sure you backup first before doing any editing.

I used BartPE to boot and there I can edit the registry.
This site has a good explanation and screenshots on each step needed to be taken to edit the registry.


1. Insert the BartPE CD into the drive, and boot the system from the CD.

2. Type Regedit.exe in the prompt, and press Enter. Select the HKEY_USERS hive

3. From the File menu, choose the Load Hive option. Browse to your Windows installation drive, for example the following location:

C:\Windows\System32\Config\

4. Select the file named SOFTWARE (the file without any extensions), and click Open
5. Type a name for the hive that you've loaded now. (Example: MyXPHive)
6. Now the SOFTWARE hive is loaded, and present under the HKEY_USERS base hive.
7. In order to fix the Userinit value in the loaded hive, navigate to the following location:

HKEY_USERS \ MyXPHive \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon

8. Double-click Userinit and set it's value correctly. Example: Set it's data as follows:

C:\Windows\System32\Userinit.exe,

(Include the trailing comma also. The above assumes that Windows is installed in C:\Windows, and Userinit.exe file is actually present in the System32 folder. You may want to verify that as well.)

9. After entering the correct data, you MUST unload the Hive. To do so, select MyXPHive branch, and then in the File menu, choose Unload Hive. It's important to note that you'll need to select the MyXPHive branch first, before unloading it.

10. Quit BartPE and restart Windows. See if you're able to logon to your profile.




My problem was that somehow my registry got corrupted. The value for the userinit is:
C:\windowsstem32\userinit.exe,\s So I changed it to the value given above.

1 comment:

Owen Choo said...

Finally...