Realtime Twitter Updates

Saturday, July 21, 2007

Fixing User Profiles in Vista

I've just had a very scary PC experience. After a busy day at the office I came home with my laptop, opened it up and found that although it was running, the screen wouldn't come on. After leaving it for a few hours my only option was to switch off.

I did this, and restarted the machine (running Vista x86 business) only to find I was not able to login.

I would get an on screen error somewhat like

The user profile service service failed the login. User profile cannot be loaded.


In the application errorlog (eventvwr.msc) there were errors from the user profile saying
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly.

DETAIL - Access is denied.


Arrgh. Another reboot no joy... Fortunately I had another id on the machine with admin privilige so I logged on.

After much googling I found out that the critical files are under
c:\users\MYUSER\ntuser* . Crucially the "ntuser.dat" file is actually a registry hive, so my running "REGEDIT", selecting HKEY_USERS in the nav, then "load hive" from the menu, I could browse my settings. So the file was not corrupt, it was there.

What now? Well I found additional registry entries with REGEDIT under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


There was 1 line for each profile. Crucially if a profile is bad there are 3 things worth checking
a) Ensure the key name doesn't end in ".bad"
b) Ensure the RefCount value is 0
c) Ensure the State value is 0

Having done the above, the profile then worked fine, and I'm now back up and running with all settings intact.

Phew. I certainly learnt something in the process, and hope this helps you too!

- Nigel.

144 comments:

Chris Quirke said...

I've seen XP eat profiles, and often it's either NTUser.dat itself (harvest replacement from C:\SVI via Bart CDR boot) or a corrupted NTUser.dat.LOG (rename away, and fix the file system).

But in your post, I need more detail on "RefCount" and "State" values - where are these?

On registry harvesting in XP:

http://cquirke.blogspot.com/search?q=Registry+hive

Anonymous said...

Thanks for the info.

I am having the exact same problem but I only have 1 Administrator profile (which is the one that is corrupt), or course I cant access any of the files to try and fix this even using my password?

I hate windows Vista with a passion!

Anonymous said...

This worked for me. Thank you for posting this.

Christopher Payne said...

Thank you so much for listing these steps. They absolutely saved me. One thing: my profile was listed with a ".bak" extension and not a ".bad" extension. At first I left it alone but my problem remained. I think removed the ".bak" extension and I am now able to log into my account. Thanks again for posting this.

Anonymous said...

Same thing happened here.
I changed the ref to 0 and the profile stated working.

Thanks so much!

Anyone know what causes this?

Anonymous said...

alright, so i've managed to do all of this, however, when i change everything to the way it should be and i restart, the problem isn't fixed...i go back into safe mode to find that all the settings i changed were changed back to what they started as.......am i missing something?

Wil said...

Thank you so much! Nice fix! Oh Vista, you card!

Anonymous said...

I too have had this problem with a new Vista laptop. The problem occurred about a week after I started using it, and immediately after Windows Update automatically downloaded about 12 new updates. As I had only one administrator account set up, and that one was deleted, my only option seems to be a complete reinstall.
So many people have had this problem in the last few months, often triggered by Microsoft 'updates' - I think it is about time Microsoft acknowledged the problem and posted instructions on how to fix it onto their knowledgebase.

planetf1 said...

I'm glad this is helping people. I was gutted when it happened to me - it was an especially bad time so I set aside a few hours to crack it.

Why it occurs I can't say.. I think some apps keep the user profile open longer than necessary -- I know for example a recent Symantec Antivirus 10.2 fixpack helps here -- although I don't have SAV on the machine I had a problem with.

Clearly windows does try to keep backups etc, but it doesn't always work out.

This is one thing that was so much esier during the beta - simply raise a defect. Now it's a GA product it's much harder to raise prblem!

Anonymous said...

@anon jul29
If you start up in safe mode, isn't there a hidden admin account?

planetf1 said...

There is an additional admin account that can be enabled. However I didn't want to have to recreate my user profile as I had a lot of application customization setup, so I was trying to preserve that... rather than my problem being a total lack of access to the machine.

Abby said...

Hey i got the same error , and i just performed a system restore from safe mode and it resolved the issue ...

Anonymous said...

If you have only one administrator profile do the following to create an additional user profile. Then use this account to reset the refcount in the
registry editor.

Deep inside the bowels of Windows Vista, there's a secret Administrator account, and it's different from the normal administrator account you most likely have set up on your PC. This Administrator account is not part of the Administrator group. (Confused yet? You should be.) It's a kind of superadministrator, akin to the root account in Unix, and by default it's turned off and hidden. (In describing this hack, we'll always use the capital "A" for the secret Administrator account, and a lowercase "a" for a normal administrator account.)

In versions of Windows before Windows Vista, the Administrator account wasn't hidden, and many people used it as their main or only account. This Administrator account had full rights over the computer.

In Windows Vista, Microsoft changed that. In Vista, the Administrator account is not subject to UAC, but normal administrator accounts are. So the Administrator can make any changes to the system and will see no UAC prompts.

Turning on the Administrator account is straightforward. First, open an elevated command prompt by typing cmd into the Search box on the Start menu, right-clicking the command prompt icon that appears at the top of the Start menu, then selecting Run as administrator -- or just use the shortcut you created in the previous hack.

Then enter this command and press Enter:

Net user administrator /active:yes

From now on, the Administrator account will appear as an option on the Welcome screen, along with any user accounts you may have set up. Use it like any other account. Be aware that it won't have a password yet, so it's a good idea to set a password for it.

If you want to disable the account and hide it, enter this command at an elevated command prompt and press Enter:

Net user administrator /active:no

Anonymous said...

excellent suggestion for using the hidden Administrator. Thank you very much

mma238 said...

Hello
Dear Nigel
Thank you very very much.
You helped me to not using
system restore or
reinstalling Windows.
Thank you again.
With the best wishes
mma238

Guruvayurappa said...

Hey buddy! thanks a lot for the steps i faced a similar problem and its resolved now..... Cheers to you!

planetf1 said...

Thanks for letting me know it was helpful - it's great to get the feedback. It certainly saved me a lot of pain!

Having said that I subsequently switched my laptop over to linux (I'm a sw engineer), although still use Vista (which I also like) on my desktop home system.

Anonymous said...

You're a life saver! I would offer you my sister, but I don't have one!

Anonymous said...

Thank you a MILLION !!! you just helped me fix the issue on a PC. Thank you again...

Anonymous said...

I've experienced the same problem, unable to log in, having only "Administrator" account. This problem occurred upon automatic re-boot after Windows update on Nov. 13, on my brand new, two week old Dell computer, running Windows Vista Home Premium. My solution: Reboot in "Safe Mode" then select a "System Restore" point, prior to the Windows Update that was installed today. I was able to reboot, log in, and very lucky to find that my data was not lost. I suggest disableing Windows automatic updates, and checking online for any problems regarding the updates first. Also suggest creating periodic system restore points. Always have a backup for your data. Dan Bateham...

Anonymous said...

so if we just have only 1 admin which can't be used we need to use a hidden administrator to fix this prob, Am I correct?

how about system restore? is it used 'admin' login too?


thanks,
susan

Anonymous said...

Just confirming that this worked for me. Thanks!

Vista Ultimate 32-bit

Anonymous said...

The first bit didn't work for me, setting the values to zero that is. I wasn't able to delete the .bak either. But then, I'm no computer wiz. A system restore did the trick, thanks a lot guys!

/John.

vistaKILLSsme said...

Okay, so under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList I can see that under my profile (the only admin account) that my State value is 0 x 00008000. I double click that and attempt to change the value to 0 and I get "Cannot edit State: error writing the value's new contents."

I tried to open the 'hidden' Admin account using the command prompt while on another account in an effort to simply use system restore. I enter 'Net user administrator /active:yes' and "Access is denied"

!?!?!

Help!

Oh yeah, I don't know if I screwed up the file "ntuser.dat" because I accidentally tried to open it using Adobe. It always tries to open the file using adobe and has an Adobe logo over the file icon.

Any help would be much appreciated.

email: laughatdanger11@bellsouth.net

rhonz-a-million said...

hi. i've read everything but it still it wont work. we two accounts but i'm administrator. i tried going 2 my sister's account but the disk to reinstall the windows vista needs my permision to run it. and if i right click on the cmd it also needs my password. but again my account cant be logg on. so please help me.

i didnt try this, but where can i go 2 be in this situation?:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

jb said...

"This WORKED for me" I exclaim! New Dell/Vista Home Premium computer. I ran the first set of Windows updates and next boot up fail with the message "user profile cannot be loaded". I followed Nigels instructions by:
Booting into safe mode. You can do this by hitting F8 when your computer just starts booting (I tap it every half second to catch it). Choose Safe Mode with Command Prompt. Then in command prompt window you will get type REGEDIT.

Then, as Nigel says, click down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList and find the list of profiles. I found the real good one ending in ".bak". The bad one Vista stuck in had the same name without .bak. So I renamed that key with ".new" in case I needed it, then removed the .bak extension from the original. Then under that one I checked that RefCount was already 0 (double click that key to check/change value). Then I actually had to change "State" from 8000 to 0.

I then closed regedit, type exit on the command line, ctrl-alt-del to get the "Restart" button in the lower right and POOF, up came Windows just fine. Yippee!!! Thanks Nigel for helping to fix my mom's Christmas present.

Glenn said...

Many thanks Nigel & also JB. Followed word for word and got around the log in issue I was having. Means I have to do work over the Xmas period now!

Ryan said...

You legends!! im up and running again. I rang dell and they wanted £25 to fix the problem over the phone! There having a laff, bet they set the update to mess the profiles up to make some money fixin all the problems!Cheers

pnaw10.com said...

Nigel, thanks not only for your solution, but also for posting a link on several other forums. Your page didn't come up on Google, but your links appeared on several of the forums Google DID turn up.

But, what finally did it for me was the comment from "JB."

Nigel, your original description said to look for Ensure the key name doesn't end in ".bad"

You should change this to bak.

Also you never really said what to do if we do find one of these conditions. I had a profile ending in .bak and the State was 0x8000. Changing the state to 0 is simple enough... but what about that .bak entry? Was it safe to just delete the ".bak" and call it good? I didn't know until I went down and found JB's comment.

Alex said...

I've had the same issue since a recent update BUT after following the steps last night it re-awakened yet on bootup the problem reappeared today (grrrr)

Thankfully I have 2 admin accounts but why the hell should I have to delete one if it is in some way corrupted - and do I?

HairyAl

Anonymous said...

whoever said the
"Net user administrator /active:yes"

you are the f*cking man.
much appreciateed

Anonymous said...

I just had this problem and fixed it using system restore. Phew.

But then I was amazed to find this list (and others) of people who have encountered the same problem before, going many months back.

This is my third serious bug in Vista so far, for which I have yet to find a single fix by Microsoft - or even an indication that they are aware of the problems.

Let us hope this problem happens to Bill Gates soon, maybe then MS will do something to fix the cause.

Anonymous said...

Wow!! Just got it working again. only took me 3 hours!! Iwas thinking i would have to do a reinstall. The process id did was press F8 To log in to safe mode on windows start. Type regedit in the search bar of windows and go to registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

change ref count to 0
state to 0
When i changed these it didnt change anything. My user profile ended in .bak. I simply removed this and windows logged on normally again.

Phew!

Anonymous said...

Thank you, thank you, thank you, to all that posted advise here.

Started in safe mode and then followed all the instructions.

Only thing that foxed me was finding my profile in the profile list as I was expecting just to see something with the user name. However, by clicking on the profiles, particularly if there is one ending in .bak. You soon realise which on is the corrupted profile.
Many thanks for saving me from a Vista re-install.

michael said...

Hey guys, I was very thankful to read your advise and I did everything!
Now I have a big problem, caus I deleted the .bak and filled in .new instead... The stat I changed from 8000 to 0 as you said, but when I resarted the system I found out that my old profile changed into a completely new and empty one!
Did I lose all my data now?
Please help me, I'm despaired!!
Michael

Thomas Phillip said...

same here, I removed .bak, and now my accoutn is a new one, my data is still on the pc from the old account but for some reason the data is stored in the program files :S

Thomas Phillip said...

To michael -
Go on your Hard Drive (C) and go on Users and go to your old accounts folder, and all the files should still be there, create a new account for yourself through the one your currently on, log on to the new account and log off and log back into another account, go back to the Users folder and copy all files off your old account and paste them into the new account, then everything should be fine.

Anonymous said...

When you say to 'remove the .bak', are you saying to just remove the .bak extension? Because the record won't save after I do that. I have been able to zero out the State value, but not to get rid of the .bak. This happened to me before, after an automatic update and I was able to fix it with a system restore. I have since turned off the auto updates, so I'm not sure why the user profile is corrupt now.

Anonymous said...

Thankyou SOOO much for this information guys. My new Inspiron with Vista just stopped working earlier today and came upwith the logon error described above.

I too had only one administrators account.

I followed JB's very clear instructions (thankyou so much!!!) and I'm very relieved to report that my user account is now back on it's feet, with my 15,000 word dissertation safe and sound! phew!

Anonymous said...

Thanks so much JB - guided me (non tech ability!) thru and solved our prob. Same issue as lots of others- new dell computer week old and user profile login failed for no apparent reason... THANKS again

Anonymous said...

I followed the posting from Dec with one exception: I could only boot in safe mode with networking because of an error with the other modes. I found the corrupt profile. It has only 3 lines: Default, profile image path, and run logon script. I could not delete it or rename it. The one with the BAK looked good, but had a state of 8000. I could not change it to 0, and could not rename the profile. I believe that my inability to change / delete / rename has to do with security,but I do not know how to get aroundthis. Any ideas?

Anonymous said...

Many thanks for your advice on how to solve my problem 'user Profile service failed the logon. User profile cannot be loaded'. I am the only administrator and once I got this message could not access any of my files, nor did my password work as administrator in other accounts. I am comfortable with the applications but not going into the system. I went into Safe Mode and then System Restore and accepted the last date - as easy as that!

Anonymous said...

The computer will just not let me change the state value data from 8000 to 0. It says Cannot Edit State: Error writing the value's new contents.

Xantheon said...

I didn't read all of the posts in this thread, but I had a similar issue and the keys here still helped. In moving a Vista machine to a new server, I needed to disjoin the computer, then join the new domain (same domain name, just a new server upgrade) and wanted to keep the profile in the same folder. Since the user SID would be different, I needed to erase traced of the old account and rename the profile folder. I forgot to rename first, so, when I logged the user in the first time, it created a new folder C:\USERS\[username].[domain name]. So that it sysnched up with old backups, I wanted it to be just C:\USERS\[username] . To fix that, I just logged in as an admin and deleted the folder. On XP, that would make it recreate it without the extension, but under Vista it gave me a error "cannot load profile" (or something similar - it's in German, so, not sure how it would exactly be in English.) Anyway, I went to the registry and deleted the key that was named with the SID for the user (found it by looking at the folder it was referencing for the profile). Then, when I logged in as the user, it recreated the folder with just the username. Hopefully that will help someone...

Piotrek said...

Hello Everyone,

I just wnated to thank you all for your solution with the hidden administrator and the Registry fix.
It worked perfectly for me too ;-)

All the best

Piotr

Anonymous said...

Thank you all, i tried every which way to try getting around this error, and the system restore was by far the easiest but not the most fun. I learnt a lot.

I started in safe mode (F8 on boot up)typed 'rstrui' into the search box. It comes up with the system restore function. Make sure u choose a restore before the last windows update and hey presto.

Thank u all. Mucho appreciated.
Wez

Anonymous said...

Thanks for the advice. My machine is up and running again. Only took me about 10 minutes:) I have a 2 month old Dell Vista machine that had the "profile cannot load" issue.

I was on the phone with Dell premier support for an hour two nights ago and they tried to convince me that I had a virus and that Mcafee just wasn't up to par...

Anonymous said...

I just had this issue! JB also fixed it!
I should say, although this doesn't appear to work for everyone, you can log-in as a non-admin account and type regedit in, then right-click it, and select "Run as Administrator", then enter your administrator account's password, and it should work from there.

That is how I did it, as I couldn't boot into safe mode (for reasons unrelated to this).

Anonymous said...

Thank You!
Fixed regedit and also restored NTUSER.DAT from good copy

Anonymous said...

jb and everyone else - we followed your advice and it worked!!! My essay will be in on time! THANK YOU!! Jenni

Elizabeth said...

I just got this error many months after you. Of course, microsoft updates have been downloading almost everytime I use my computer.

Anonymous said...

I had the problem yesterday and with the help of this blog I fixed it. I had quite a bit of experience using regedit over 5 years ago but had hoped I could forget it. What happens to the poor user who has no idea what any of this stuff means.
Thanks for easing my panic when this happened.

Anonymous said...

Thanks a lot everyone, i was scared when i couldn't in to my account. But I acces safe mode and i did a restore and waallaa,

Regards

Geert said...

Super! That saved my life! And my profile of course. :) Thanks a lot.

Anonymous said...

Thank you so much! I didn't even know that stuff existed... (Not an advanced user) But I still managed, with the help on this blog.

William said...

Nigel and JB, you're life savers! I had this exact problem with `user profile service failed the login' and followed what Nigel and especially JB said (easier for me to understand) and it worked! Amazing! Thank you both so much!!!!!!!!!

Anonymous said...

Thank you Nigel & JB, writing here from Ithaca, New York at Cornell University. I awoke this morning to find the 'failure to logon' message and was blanketed by fear and loathing. This blog was about 10-15 deep in my google search, other fixes were very complicated and as a computer novice I was hesitant. This one worked perfectly (as I type on my fixed machine)!! You don't know how thankful I am, really, you guys write this stuff just to help people and it really does, it's so nice!

As for constructive tips, I did exactly as Nigel noted and in Vista Safemode not the command window (as I do not know MS-DOS). I also renamed the new profile Vista created *.new before removing JUST THE SUFFIX ".bak" from the profile I wanted. I also changed the "State" values. Just double click file to change value. When I restarted my screen was all black but cntl-alt-del pulled up the logon interface, I logged off and on once or twice then it sent me to the proper profile. As a check, I deleted (after backing up) the file I renamed with *.new, and when I restarted there was no black screen and it was a-ok!!

You guys are the best! So grateful!!

PS Apologies, I do not understand the identity sections, so I am anonymous, but this experience and your help was very much real. Thank you.

Anonymous said...

As above "Thanks very much for the help". followed jb's post on the 15th Dec which had followed Nigel's post.

Anonymous said...

Thanks so much Nigel, JB & Wez! I just encountered this same issue on Vista Ultimate, running on a local Workgroup setup with the Administrator account.

I initially tried following Nigel and JB's posts, but had little success; (at least they reassured me that the darn profile still existed! Thank you guys for the very clear instructions.)

After failing the initial fix methods I followed the "anonymous" post by Wez, and was able to restore and regain my profile in seconds:

*****

"started in safe mode (F8 on boot up)typed 'rstrui' into the search box. It comes up with the system restore function. Make sure u choose a restore before the last windows update and hey presto."

*****

This worked wonderfully, and restored everything for me; thanks again all!

-Wildcard

Mat said...

I have the same problem, however your solution doesn't work for me.
I have only one account and keep logging on temporary account. When I followed your instructions after reboot i still couldn't log in to my profile. When i checked reg again there were both .new and .bak folders. I changed everyting how you suggested but after reboot everything is the same. And also new Temp accounts in C:\users are being created. And one more thing, in registry despite accounts .bak and normal one are three more. In info path is written that they are service, network or something like that. I am working on different computer temporarily so I can't check it. Please Help !
my email address smaagly@gmail.com

Anonymous said...

have been using Vista Business for a year. First time with logon problem. Only had one profile so I log in in safe mode (F8) and did system restore. this fix my problem. By the way I now have added the Admnin User so at lease i have two chance to log on now.

Thanks to all, great info

Anonymous said...

Heya, erm just curious how do you go about removing the ".bak" extension?

computerdr74 said...

Just wanted to say that it is wonderful hearing all of the praise. However, I'm more solution oriented. I want to know the problem so the solution can be to avoid, not fix the issue. My question is what actually causes this issue? Anyone know? We have found that sometimes it occurs following updates from MS, after going to sleep, after hibernation, after joining the domain for the first time, after accessing a Terminal Server, disjoining and rejoining domain, etc. There is no real commonality here other than it is Vista.

So, to try and find a commonality, let's ask some important questions...

1. What version of Vista is this occurring on?

2. Is everyone running Windows Defender?

3. Is Vista installed via the CD or via an image like you would have deployed at work?

4. If you go to start|run type in services.msc and hit enter, do you see "Andrea ADI Filters Service" running?

5. Are there any HP services running in this window as denoted in #4?

6. Is the User Profile service running or stopped when these issues occur?

Okay, these are some important questions we must answer to see if we can find some common denominator to this issue. If MS refuses to acknowledge and resolve the issue, then we must see what we can accomplish on our own. If we find the resolution, then we can send the fix to MS to prevent this issue from occurring and we will all be happy!

computerdr74 said...

Upon further investigation, it appears that the possible culprit could be an HP service running. I've also noticed than in every case it appears that the problem only occurs when shutdown/restart occurs. The HP services for printing are notorious for causing issues and use the svchost process just as the User Profile Service does. Some, but not all, of the HP services use this process. Typically, HP provides corporate drivers for their printers. However, with Vista, these drivers are few and far between forcing most of us to install the full software package on the machine including the services just to print to their printers. It's a shot in the dark, but an educated shot. Simply put, these services have caused many issues in the past. Thus, the reasoning for publishing corporate drivers which are stripped down versions that do not include services which will interfere with domain level services on workstations and have been noted to cause workstation level issues, such as the image acquisition service issue.

So, if the commonality here is that everyone owns an HP printer and uses it on their Vista machine, then we can pretty much say that's what it is. However, I am looking into other things that could cause issues with the profile getting hosed.

Anonymous said...

just ran into this problem and am trying to fix it. I don't have a printer. Dell Inspiron 9400 laptop running Vista Business 32bit. My log-in worked this morning and didn't wok this afternoon.

computerdr74 said...

Did you just log off and log on or did you shut the machine down and restart it?

Anonymous said...

I am a computer ignorant but have the same problem on start up unable to load user profile.
Dell computer Vista ultimate ? 64 bit

IF press button to stop and then restart it is ok providing I click my profile as soon as it comes up.

Occured folowing updatets.
I have an HP printer and often have message for HP update following above occurence.

Unable to follow the technical stuff but will try and get my son to try tooo scarred myself being the old boy!!

Dirkin said...

Nigel and others (jbs post had the clearest directions), I am computer illiterate as far as it goes, but by following your directions I was able to fix my gfs laptop when the user profile suddenly stopped loading. Thanks for your help!

Bob said...

Blast you Nigel & jb!

I was just going to throw windoze out of my partner's dell and overlay it with linux when we found your fix!

Oh well, until the next M$hit bug strikes...

Cheers!

Anonymous said...

OK, I really need help with this. I have the black screen and cannot log on at all. I do not have a restore point that exists before the update and I cannot do a complete restore because the laptop does not have the files on it and I do not have the CDs. I can get to the repair window that gives me the options and the command prompt. Is there anyway to fix this.

I tried to do the registry edit but I still only get the black screen. Also it does not show any profiles, just Default and there is no ".bak" extension. Is there anyway to do a complete wipe, or to fix the black screen. I have searched many hours and cannot find anything that helps.

Anonymous said...

computerdr74 I am not using any printers. And thats sooo much for the help everyone! Esp to whom ever posted the link in antoher site. Which is how I found this :)

Milesee said...

Jb you're a star!! Just fixed my Dad's PC using your steps, and more importantly, saved my sanity!!

Dude said...

Thanks dude! This help me down my path to recovery. A couple of points that may help others.

1. The Users doesn't need to be loaded as hkey-local-machine is not in that hive.

2. Safe mode to enable the admin account.

3. The .bak profile hive should have a non .bak entity. Rename the non .bak entity to .new and then rename the .bak entity removing the .bak.

Worked like a charm. Thanks for the work

computerdr74 said...

I think it's great that everyone has positive comments about how to fix this issue. But it is probably more important to figure out why this is occurring. In my previous post, there were a few questions that were posed to try and narrow down the culprit causing the problem. If you guys are fixing these problems, please detail the situation in which it occurs by answering the questions. This will ultimately assist with tracking down the problem and getting a resolution (patch/hotfix) for everyone to prevent it.

Thomas Adrian said...

I removed the temp profile and removed the .bak extenstion + changed the values.

Now, when I log in I get notified that a new temporary profile has been created which might not be available next time. what to do ?

Anonymous said...

Thanks. I was tearing my hair out and this solved the problem and gave me some ideas to stop it happening again.

Anonymous said...

computerdr74, although I don't own a HP printer I experience the same issue from time to time.

computerdr74 said...

anonymous,
If and when you experience this issue, what are the circumstances? Does it only occur when you log in? Are you on a domain or home computer? If you don't have an HP printer, do you have anything installed related to HP Software?

Twist said...

> If and when you experience this issue, what are the circumstances?

I just fire my computer up after a successfull shutdown. Below is an error message I've found in the Event Viewer:

Source: Microsoft-Windows-User Profiles Service
Event ID: 1502
Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a corrupt local profile.

DETAIL - The process cannot access the file because it is being used by another process.

> Does it only occur when you log in?

Yes.

> Are you on a domain or home computer? If you don't have an HP printer, do you have anything installed related to HP Software?

Home computer, 64-bit Windows Vista Ultimate, no HP software installed.

humanasianboy@yahoo.com said...

ZOMG THANK YOU GUYS for your help without you i wouldave been pissed like no other. . .

ive already lost a laptop before with a lot of unbacked up data.

and i was not ready to lose another one!

good god

i did what chris said. i found another file with the same exact name as my corrupt file making it impossible to edit the name of the file

it was also labeled as temp? for some reason and didnt have a lot of files as the other so i deleted this file ( or user, whichever you prefer)
and renamed the .bak extension of the other and it worked fine!


thanks again chris I LOVE YOU FOREVER DUDE!!! but not in a love love way. . .

CraigQ said...

Hi All
I'm new to this and like most of the comments with this thread want to thank Nigel and JB for their help. My experience may help others. I'm running:
Dell XPS M1330 (18 months old and never had a problem)
Windows Vista Business
Domain
Use HP printer through a server but I don't believe that's playing a role.
Problem occurs with reboot only and not wake up/ switch user.
DEFINITE TRIGGER 3 days ago - installed Vista SP1 while not connected to the server/ host network. Next shut down and reboot brought up user failed logon message. Edited the registry as detailed in this blog (renamed new temporary key by removing .bak and changing the last number, deleted .bak from true profile key, reset State and RefCount to 0) and was able to logon again. BUT - each time I shut down and restarted the same problem recurred and I landed up with multiple temporary profiles that I was "creating" by changing the last nuumeral. So tried System Restore to point before SP1 update - system restore failed and deleted all restore points! So, on advice from ?JB, when I corrected things again I renamed the new temporary key by placing .bak at the end of this one ( I assume this fools the system because it cannot create two .bak keys.)
NOW - if I wake up from hibernate - no problem. If I shut down and reboot, then log onto user profile using fingerprint reader I get the same "The User Service Profile failed to logon" error. I press OK and it "logs off" and when I select the same user profile again but type in the password it logs on normally. (I think if I did this the other way around ie password first I would then logon with my fingerprint, but too scared to try it.) I guess the only way to resolve this fully will be to delete the profile completely and then re-create it moving my files across. Am I right in assuming that provided I'm off the network I will only need to delete the user profile from the local machine?

Thanks again for all the help - this is a pretty important business machine.

Paul said...

Thanks alot! Worked for me, and helped me out of a very troublesome situation.

LoverOfTheNight said...

Hi,

I have been unsuccessful in editing the refcount and the value, as well as renaming the file from a ".bak" to a ".new"

It says "error in writing the value's new contents" or "error while renaming key".

Any suggestions on how to solve this problem? Please help. Thank you.

info said...

Nigel you are a genius! :))) I am no user of Vista whatsoever, but my mom is... I need to fix her user profile (the only account on laptop). Without your helpful guidelines and Safe Mode tricks I wouldn't be able to fix it in short time!

Ehhh, I know 2000 and XP inside out, but Vista hmmmm, those damn elevated privileges, being and admin with no permissions or problems with copying files between user profiles or network shares... it's just wrong.
M$ should fix it or people will abandon Vista and start switching to Ubuntu for daily tasks :)))

Mark Austin said...

Wow. You are a lifesaver! I spend more time repairing this OS than using it!

Dave Campbell said...

Be aware - CHKDSK may take 30 - 45 minutes. Mine came up clean and the restart was the same.

Then did a System Restore from Safe Mode and it came back completely normal. Hallelujah!

I wish there was something one could do on their system to prevent this fro ever happening in the first place.

Great post, glad I found it. My day was really beginning to suck.

Chris said...

Thanks so much for the post and all the comments....I had screwed around with this for a few hours on and off..read this post and fixed it in 2 mins...YOU ROCK MAN!!!!

Marek said...

Thank you very much :)
A frined of mine brought a laptop with Vista HP and that error. You've saved me a lot of trouble ;)

planetf1 said...

I'm so glad this is helping people. I no longer run Vista on my laptop, although I do on my home machine.

I've actually not had a re-occurance recently, probably as this desktop rarely hangs/crashes or is force-powered off.

dancingonabladeofgrass said...

I had this error message yesterday morning!

Thanks to finding your helpful blog and particularly the comment posted by Dan Bateman on 9 November, I was able to fix the problem.

Had a single administrator account, rebooted in safe mode, selected system restore point and rebooted. Lots of finger crossing ... IT WORKED!

Thanks again - hugely appreciated.

Anonymous said...

Ok if I follow JB's instructions will I get a new user profile and will I lose all my pictures, videos and documents?

Anonymous said...

No you will not lose your profile nor its contents. Just make sure you rename, not delete those entries.

We don't want to delete the registry entries just as a failsafe and as long as you don't manually delete the files, they'll also remain.

Anonymous said...

THANK YOU!! THAT SAFE MODE, .BAK EXTENSION STUFF WORKED GREEEEEAAAATTT! LOVE YOU LOVE YOU. YOU'RE A GOD! SAVED ME FROM RE-INSTALLING. THANKS AGAIN!!!!

Derek P. said...

I work at a school with 50+ systems.

I've had this issue occur twice on me so far on staff systems. The first time, I resolved it by recreating the user profile (with the amount of data the user had, this took me all day to perform). The second time it happened, I followed these registry hacks and voila I was saved without System Restore (and took less than half an hour to complete). Thanks for saving me one full day of work!!! Your instructions are now in my database.

P.S. I haven't proved it yet; but, I think the cause of this issue is when my users Shut Down at the end of the day, my Dell PowerEdge server must be slightly disconnecting from the Dell PowerVault for a split second, enough time to corrupt the settings. Still to be proven; and, this is not the blog to post my results in.

Thanks a lot Chris!!!

-Derek

Anonymous said...

hi

you rock! it worked perfectly!
may i send you some money via paypal? you saved me hours!

thanks

fabian.merki [AT] merkisoft.ch

Anonymous said...

Thanks worked awesome

brice said...

Very happy for all the people who fixed their PC with Nigel's and JB's tips...however it just doesn't work for me.
The profile I'd like to "recover" always ends up with .bak and the Register key state value turns back to 8000.
And I'm not a genious but I'm doing everything you say (hidden admin account, safe mode, etc.....
I haven't lost any file but so far a full day of work. And since I'm pretty sure it'll happen again I'd love to find a solution better than setting up again my computer from scratch or almost!

Can anybody help me?

Cheers

Anonymous said...

Brice,
You can just rename you profile dir in the users folder to .bak and recreate the profile by a fresh login after you rename. You would also have to login as Administrator or some other account to rename you profile folder.

Mod thanks for the great tip, works perfect.

Anonymous said...

Hey guys,

I did JB's and Nigel's instructions..
I am now at the Regedit..and under the ProfileList there are 4 folders for me..

I Cant find any file with ".bak" or anything...where can i look for it? so i could change it

Help!

-Jordan

Anonymous said...

hey guys!

I need HELP!

Under the profilelist there are 4 folders for me..but none of the 4 folders end in ".bak".

funny thing is i dont have 4 user accounts, i only have one.

SOMEONE PLEASE HELP!

- Jordan

Anonymous said...

Jordan,

If it doesnt have a .bak then try looking at each object and check the path for the ProfileImagePath key and it will tell you what each profile object is for.

Anonymous said...

it worked. thanks a million!
hint: if your user file ends in .bak & your temp profile doesn't, just switch those 2 endings (you have to rename them).

Luegge said...

Nice one :)
Helped for me and it's one of the only useable posts I've found :)

Dewey said...

Thank you Nigel, you saved my friend's PC, and made me see taht two administrator accounts is a very good idea :P

bobo said...

Thanks so much guys...helped me tremendously. Quick and easy for a dude that's not much of a techie.

celal said...

Hello,

Unfortunately, I have the same problem, and I guess mine is more serious :(

When I go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, I see only these files:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-19

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-20

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-3311769753-1040648544-104229229-1000.bak


There is no a second file whose name is "S-1-5-21-3311769753-1040648544-104229229-1000" and ends without .bak.


Besides, I could not change the State value (8000).

I deleted ".bak" and changed the value of 8000 into 0. But, I saw, after restarting, I could not change anything.

I tried to "startup repair" and "system restore", but both did not work.


When I go to "Control Panel>User Accounts" I can not click "Manage another account" or any other options.

When I try to enter "C:Celal" (my user profile, it does not open. I can open "Celal>documents", but it is empty.

So, I can not reach my files in my profile.

I use a toshiba laptop (satellite m305-s4030) with Windows Vista Home Premium 64bit.

I do not want to format or full system recorvy because I have very important files on it.

Please help me!!! I need to reach my files to finish my master thesis.



Thanks

Celal Gungor

alex_f said...

thanks, have a happy and abundent life!

Josh said...

Thanks to everyone here for the help. It seems I've gotten my Profile back, which did seem lost.

celal, can you rename the .bak? You should just be able to remove the .bak, but leave the rest. I then had to change the state value to 0 as well.

Hope that helps.

CluelessRick said...

Ok, here's one for you all. (Luckily i have a pc running xp also so I can still get some web access!) To start off I have a terrible memory so I write my passwords down in a notebook (and yes, I know its bad to do that) anyway, yes you guessed correctly I lost my book of passwords! I have a acer (horrible thing) running Vista Home Basic and only have one user profile set up. That I can't recollect the password on. So I tried to activate the hidden Admin profile by using the command line instruction c:/net user administrator /active:yes (I was able to get to a commad prompt through my Vista Install disk as when I did the F8 thingy boot safe mode with command prompt it would not give me a command prompt it just sat there and flashed my profile up and asked for the password. I am at my wits end with this. Am I missing something? can anyone tell me why I can't get the admin profile to show? what on earth am I doing wrong?

Hope someone can help, I hate to have to re-install the o/s.

Thanks in advance!
Richard

celal said...

Hi Josh,
I could not do anything except formating. After I used a data recovery software and recovered a few important files for me, I did full system restore. I tried to recover my computer for 10 day, nothing worked. I was bored with waiting Microsoft's help. They are very slow and unefficient. Anyway, I appreciate you all for your responds.

Celal

Anonymous said...

GREAT walkthrough
You can also find a concise version at http://www.vistax64.com/tutorials/130095-user-profile-service-failed-logon-user-profile-cannot-loaded.html

My heart is now back down to normal speed.

All Hail the Mighty Internet!

Anonymous said...

Nigel, here is few beers waiting for you :)

Thank you very much1!!!!!!

Deepak said...

I am unable to type in my password to log in. The screen freezes and I cannot type or move the cursor. When I reboot in safe mode and then restart the machine it accepts the password. If I restart the PC from the welcome screen, it accepts the password after restart. I tried the regedit to look for the ".bak" extension but couldn't find it. All the SID ended with numbers only. Please help.

XavierTNT said...

Clap clap for your help guys!
I have a DELL laptop with Vista and the logon problem appeared after a Windows Update reboot

oskarinmoscow said...

YEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHH!!!!!!

It worked thank you very much from exchange students in Moscow we got vodka here for you fella!!! we drink in your glory!

Anonymous said...

Rock on Nigel thanks man!

Anonymous said...

Vista just lost my user profile for the 3rd time in 3 months. I had just installed these updates and restarted my computer: Windows Malicious Software Removal Tool (KB890830), Update for Vista (KB959772), and Security Updates for Vista (KB960225 and KB958690).

Anonymous said...

Thanks Nigel, this really fix the problem. Fyi, I ran windows update before this prob occurs but is that really the cause?...

surfshoptom said...

I'm sorry - I must be dense. My wife's Gateway laptop running Vista is having issues losing her profile data including desktop icons, favorites, Outlook autocomplete, etc.

Is this the same problem? Our tech has tried to fix this twice and he does, but his work is temporary. What is causing the problem to re-occur after fixing?

Thanks.

surfshoptom said...

OK - I'm not sure if our problem is the same. My wifes Gateway laptop running Vista seems to be losing track of her profile data. It changes the desktop icons, favorites and Outlook address autocomplete capability. Our tech has fixed the problem twice. There must be something he's not doing, because the fix only lasts a day. What is he missing? Thanks.

Anonymous said...

http://www.vistax64.com/tutorials/130095-user-profile-service-failed-logon-user-profile-cannot-loaded.html
actually an official's answer.....will try it on my friend's computer which has the problem...

Anonymous said...

http://www.vistax64.com/tutorials/130095-user-profile-service-failed-logon-user-profile-cannot-loaded.html

Jonathan V. said...

Confirming it works.

IF you have Windows Vista then you must look into the C:\windows\system32\regedt32.exe then right click it and Run as administrator... then perform the change he said.

Greetings,!

marwerno said...

@ computerdr74
I also have the very same problem on a Windows Home Server Machine. No printer, connected, no HP related Software or Hardware.
It happened to me quite frequently (almost every second reboot!), mostly restarting the system fixed it. Only once it created a new Admin account (with all my settings gone :-((((( Luckily the "old" account folder was still there.
Since there is only one account setup (setting up more is tricky in Windows Home Server as it might corrupt other settings...)
I was only able to fix it by putting the Hard Disk Drive into another computer and copy my "old" admin account settings into the newly created account setting folder. A bad workaround that I would not like to do again. Especially since it is a compact Server (currently in testing phase, everything open. But once everything is setup, it will be tricky (=time consuming) to get to the disks!) I really would like to see WHAT is the problem so it can be avoided in future!

duitwithsbs said...

In having found this issue on my own domain profile and being the administrator of a domain that is typically managed locally from this Vista machine, I am being deeply affected by this. I had to bite the bullet with this profile's previous issues and remove it. But that didn't go cleanly with some error message I didn't record. Now I am seeing it all come together.

So invested with this issue in fact I've been digging and I may have stumbled onto something, once I determined what the SID was of my (attempted) removed Profile, I was able to search the registry looking for all instances of it so to clean it completely out. What I found was that there is a registry key with a permissions issue such that the local administrator account cannot view it, delete it, export it, or even assume ownership. It is a subkey of Media Player - I'll post back specifics later if this amounts to the solution.

So what to do? ...go to one of my blog's most popular posts referring to SubinACL:
http://duitwithsbs.wordpress.com/2008/01/22/registry-permission-reset-meet-subinacl/

I'll be hacking that key's permissions momentarily and hopefully break through this barrier to my profile issues.

Thanks for pointing to the registry keys to get me digging.

Anonymous said...

THANKS! A simple and good solution to what seemed to be a hopeless problem. I first had to delete the "duplicated" new temp user key generated by Vista to be allowed to rename the original key with ".bak" extension due to duplicate filename. Woila! Exellent Nigel!

duitwithsbs said...

The key was the problem, reset the registry permissions via SubinACL and seized the security rights and ownership of the key and deleted it.

The culprit key was:
HKLM\SOFTWARE\Microsoft\MediaPlayer\Preferences\HME\[SID]

Now I'm wondering if there is a way to query the registry for problmeatic keys? I'll let someone else brainstorm that one.

Anonymous said...

hello."userprofile failed to log on..."etc has appeared on my acer laptop/vista home basic.online fixes include "delete .bak" bit in regedit,but on here it says there was an error renaming.any other ideas?i tried "f10" start repair on start up but it made a screeching noise and i stopped.i have a standard user account on this so i can access the internet but not my profile with music/pics etc.please help.i'm a newbie to this computer stuff.thanks.

Anonymous said...

THANK YOU to Nigel and everybody else who contributed to the resolution of this problem! I got the very same errors when I booted up this morning, and after doing some research, came across Nigel's blog and applied the recommended fixes. IT WORKED!!!!

Anonymous said...

This worked for me, too! In the registry, I had State as 0x100 (256) and RefCount as 1. Resetting those to zero let me login again.

Whew!

Mary said...

This worked wonders for us!

My dad's account (the only Administrator!) was the one to fail the log in. A quick google search found me this site. I restarted in Safe Mode with Command Prompt, yet it wasn't letting me preform the regedit. Everything I tried would fail.

So instead, I logged in as normal, ran command prompt as an Admin (dad's password still worked, his profile just wans't loading) and the the fix worked perfectly.

Thank you so much!

Anonymous said...

Thank you for saving me. It worked like a charm..

thank you

Lydia said...

Thank you sooooo much. I have had this happening seven times already, and every time I searched for a solution on the internet and found nothing, and of course the solution microsoft has doesn't work. I was so tired of reconfiguring every time... I noticed it happens after I install updates for windows vista, but I don't know if it is related. The extension for the bad reg keys was ".bak" on my registry, not ".bad". Anyway... Thanks again!

Vicario said...

OMFG!! Thank you so very much! at the beginning I was exceptical... why such an error can't be self-repaired by vista? Conclusion: Microsoft s*cks

Anonymous said...

i tried doing a system restore from the safe mode and restarted the system and that resolved the issue.

Anonymous said...

Works like a charm, just renamed the one named .bak to no extension, renamed the old one to .bak and set the RefCount to 0. Saved me a 300 mile client support trip!

Iventio said...

Just want to really say KUDOS b/c you definitely saved me from a reinstall, I was able to log in but the default profile loaded with all my program data missing but I followed your instructions and JB's clarification and SAVED MY SYSTEM thanks Man :)

Anonymous said...

thanks! it worked after Vista SP2 update nightmare...
Luca

theintrepidfox said...

Hi. I too encountered the Vista 'The User Profile Service failed the logon. User profile cannot be loaded.' error.

I checked the registry for .bak extensions on the user profile but removing it didn't do the trick. As soon as there wasa failed login the .bak was added again in the registry. However, the following did the trick:

Turning on the Administrator account:
First, open an elevated command prompt by typing cmd into the Search box on the Start menu, right-clicking the command prompt icon that appears at the top of the Start menu, then selecting Run as administrator -- or just use the shortcut you created in the previous hack.

Then enter this command and press Enter:

Net user administrator /active:yes

From now on, the Administrator account will appear as an option on the Welcome screen, along with any user accounts you may have set up. Use it like any other account. Be aware that it won't have a password yet, so it's a good idea to set a password for it.

Remove .bak extension if present.

I then logged on under the Administrator account and checked the security settings for each user's profile under c:\users\USERNAME. I noticed that the profile that failed had not the User granted permissions on the user folder. E.g. User SMITH was missing from profile SMITH. Only ADMINISTRATORS and SYSTEM were granted access. I added USERNAME with full permissions. There will be an 'Access Denied.' message at times but that's ok. Just click it away. After this is done, log off Administrator and you now should be able to log-in.

PS: If the profile you can't access is the only profile you have, try logging on in Safe Mode and follow the above steps. It should still load in safe mode despite the .bak extension.

Anonymous said...

Works for me too! Thanks a lot!

Anonymous said...

God bless you, it worked like a magic for me too! Now I need to forward this link to our IT guys ;)!

Nigel Jones said...

So glad to see this is working for many people. Glad to have shared my experience.

No idea if it applies to Windows 7 -- no longer running it on my laptop, but still have a number of PCs at home (just one on RTM)

HarryO said...

Thanks Nigel, your advice worked for me. But note that in the profile list there was two profiles with the same name, the second with the extension .bak. I deleted the first one and then removed the .bak from the second. Everything is running fine now. HarryO.

Anonymous said...

I know this is old, but this is the only solution I've found that works for this scenario with the "User Profile Service service failed logon" error from upgrading from Vista to Windows 7.

All solutions including from MS just state to delete the profile from the registry, but whenever I reboot it creates a new profile with the same issue.

What fixed it was the changing of the values to 0 in what was listed by Nigel. If anyone reads this, this definitely worked and is a different solution than what was found elsewhere on the internet.