Sometimes when XP boots, instead of going to the desktop and icons, it brings up a window and goes directly into My Documents folder.When you are facing such a problem, is really annoying since you have to close it every time.This could be due to a long file name or a file path with spaces in the startup program list.
To check it try the following .Click Start - Run, type, MSINFO32 and press enter. This will open the System Information window.Click the Software Environment and then Startup. This will show the exact command lines of the software loaders. if you find any path that uses a long file name or a path with spaces then this entry could be the problem.
Just follow the steps to edit the registry settings :-
Start > Run > type "regedit" (without the quotes)
This will open up the registry editor. Then navigate to:
In there there should be a value (on right hand side of screen) called Userinit.
Change the value that reads as,
If you do see a duplicated string in there similar to the above - simply double click on the Userinit value and edit the data so as to delete everything to the right of the first comma (,). In the case above you would leave only:C:\windows\system32\userinit.exe,
If that does not help, see what startup applications are running. Get the Autoruns utility from www.sysinternals.com and inspect the startup programs.