Friday 9 September 2011

Windows 7 - Lost desktop icons, User files, Documents, Settings - Corrupt User Profile

I was recently asked to fix a laptop that seemed to have a corrupt User Profile on Windows 7. For no apparent reason, the user booted up his laptop one day, entered his password as normal only to see a "Preparing Desktop" message appear (like you get before logging onto Windows for the first time on a new User Account) before loading up his desktop, minus his custom shortcuts, desktop files, and everything under his user area seemingly disappeared. Various application shortcuts didn't work and in general it looked like it was a brand new User Account desktop...except it wasn't.

Googling this issue came up with various suggestions and supposed fixes, some which had no effect on fixing this issue. The method below is how I fixed it, but check my checklist as not all logon problems are the same, so you may have a different problem to what I was presented with.

Symptoms I had were;

  • "Preparing Desktop" at logon, when logging onto a User Account thats been used before
  • Desktop looking standard - no custom icons, shortcuts or files stored on the desktop not visible
  • In the User area (C:Usersusername, used to be My Documents) - all folders are empty
  • Certain applications may have lost their configuration and appear to be loading as if they hadn't been run before.
At this point it's worth mentioning that this is no reason to panic - you're files etc are still on the PC, but your User Profile has become corrupt so they're not visible. Browsing to C:Usersusername will show you your files are still there, but going to the User Area from the Start Menu or Desktop will show it as empty. If you click into the Address Bar you'll notice the reason - it will show "C:Windowssystem32configsystemprofile" or something similar. Now you could copy all this files back over but it wouldn't fix the problem entirely, or you could create a new profile and copy the data back over to that.
However, it's quicker and makes more sense to follow the steps I carried out, which I will now explain - click images to enlarge in a new window.

First, we need to open the Registry Editor. Click "Start" and type "regedit".
Now we need to make a backup of the Registry. Do this by clicking "File" and then "Export" and choosing somewhere you'll remember to save it.
Now navigate to the following location in the Registry;
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrent VersionProfileList
Look for the key starting S-1-5 with a long number followed by it. Click it and you'll see in the right-pane that the "ProfileImagePath" is set to "C:UsersTEMP" - this is part of the problem, it should be related to the user, in my particular case it should be "C:Usersmartin".



In the left-pane there should be an indentical key under "ProfileList" but with ".bak" at the end of it.


 
If you click this, in the right-pane you'll see the "ProfileImagePath" is correct, and there's more subkeys.




We need to restore this key.
Click the incorrect key in the left-pane and rename it by adding ".bak2" to the end of it.
Now click the correct key (the one with ".bak" at the end of it) and remove the ".bak" from its name.
Exit the Registry Editor and restart your computer. After logging back in, desktop files, shortcuts etc and folders and files in the User area should be restored. Any shortcuts to applications should work again.
If you have Microsoft Outlook, it may need to be reconfigured and any local .pst files be imported again.

6 comments:

  1. Its not working for my system..
    Mine is Windows 7 Enterprise Edition.
    Can ypu suggest me what should i do ?

    ReplyDelete
  2. The symptoms were exactly as you describe and I had a major moment of panic but this solution seems to have worked perfectly... everything's back where it should be.

    Thanks
    Dave

    ReplyDelete
  3. u r genius, came 2 my rescue, thanks mate.

    ReplyDelete
  4. Brilliant, really helped me out!

    Thanks

    ReplyDelete
  5. I can't find the solution... i've got the same problem.. Twice! I reinstalled the computer and a week later it was shit again! I even saw it happen while i sat there!
    All my settings of where all 'shortcuts' to My documents and such are all gone!
    My windows menu went completly empty, no program worked Unless i went to Explorer and started it from there, but there's no setttings left, so i can't even se flash or anything!

    My C is a SSD that is about 2yrs old..
    As i didnt want it to have all my data on it, i changed temp, my documents, and lots of other stuff to E.. and that has been working great.. untill now..

    ..... any advice?
    Or explain why this happends twice for me in such a short time?

    I have only one user, and I am the only one who use the computer.

    Regards Patrik

    ReplyDelete
  6. Windows said that i have 30days left, my windows update said there's an error....
    Probably when k start the computer next time my browser Chrome will report 5 error messages about my profile just like last time(1-2 weeks ago)

    And My documents and such folders will be hidden again...

    ReplyDelete