# Windows XP logs in & logs out again & again :(



## rthegr81 (Apr 6, 2008)

Hey!
I'm using Windows XP (Professional) on my Dell Laptop. Yesterday when I started windows, it logged me in, showed me the desktop & then logged off. Since I don't have a password for my user, it automatically tried logging in again and again logged off.

Its either a virus or maybe some problem with the registry. I do have a backup of the registry which I would like to import but the problem is how do I run regedit and import the backup file without logging into windows?

If anyone faced a similar problem before, plz help...

PS:
->Safe Mode leads to the same problem.
->Every time this happens I need to forcibly shutdown, and then boot via XP CD to repair the partition so that i can see them in ubuntu


----------



## ravi_9793 (Apr 6, 2008)

Is it new problem... ??
Have you tried system restore.


----------



## rthegr81 (Apr 6, 2008)

@ravi:
Err.. how do i do system restore *without logging* in windows??

Thats the whole problem... before even the icons load or the taskbar appears (ie. before explorer.exe runs) windows logs off. and then it keeps doing it in cycle till i get bored and forcibly shutdown.


----------



## iinfi (Apr 6, 2008)

i found something while searching for your issue
Google Search
Source


> It's probem in the registry.
> 
> You need to download a live linux cd specifically made for editing the windows registry because you can't get into your PC any other way, I had the same problem and fixed it by bypassing Userinit.exe, by replacing it with Explorer.exe
> but microsoft says the correct way is to do the following
> ...



Disclaimer: i didnt read it completely


----------



## rthegr81 (Apr 6, 2008)

@iinfi: Thanks a lot for the help!
I guess there's something wrong with the userinit value only...
I'm currently using linux.. so will search for windows registry editor and try and fix the problem...


----------



## mehulved (Apr 6, 2008)

safe mode?


----------



## sakumar79 (Apr 6, 2008)

@mehul, see first post PS in which author has tried safe mode....

@rthegr81, I hope you have tried Login with Last Known Good Configuration instead of Safe Mode also? You can also boot with XP CD, go to recovery console, and run sfc...

Arun


----------



## rthegr81 (Apr 6, 2008)

yoyo!

Finally got everything back to normal.
As iinfi said, it was a problem with the userinit key in the registry. I restored the old registry from one of the system restore files in my windows partition.

For those who might end up with such a problem later [Or if you wish to restore your registry to an older version - probably if some virus corrupted it or something] then do this:

Use Windows XP Installation CD to go to Repair mode.
Then type: 

dir  "c:\system volume information"

Change to the Restore Point folder by entering

cd  "c:\system volume
information\_restore{bb7e35f9-d278-45fa-9dde-fe709cd0f23d}"  
^^ Value in { } will vary..

List the Restore Points by typing "dir", choose the second to the latest
one, and change to its snapshot folder.

cd "c:\system volume
information\_restore{bb7e35f9-d278-45fa-9dde-fe709cd0f23d}\rp1219\snapshot"
^^ Again the value after \rp#### will vary... choose from the dir listing

Copy the following config files to the \config folder by entering

copy  *_registry_machine_system* *c:\windows\system32\config\* system

Repeat for *sam, security, and software *. Then copy 'default' by entering

copy  *_registry_user_.default * c:\windows\system32\config\*default* 


Thats it!! Registry restored to old backup 

PS: I used ubuntu to do the above tasks... Sometimes it helps to have 2 OS!!

Thnx to everyone for helping out!


----------



## iinfi (Apr 6, 2008)

kool


----------

