windows 7 - Accidently logged off and can't use computer

  • Amanda Hampel

    My sister has accidentally logged off the family's computer instead of selecting shut down she clicked log off, and we don't have a log in and off set up. We have tried to click on the picture that comes up but it keeps coming up saying something along the lines of "The User Profile Service failed the logon. User profile cannot be loaded." All we can do is turn it off. We can't get into the computer to try to log off or anything? If someone can please help or suggest something that would be great.

  • Answers
  • Majenko

    I had this with a customer recently where their daughter's laptop was giving the same problem. She had renamed the C:\Users\Username folder to be in her name, and since that point she could no longer log in.

    What I had to do to fix it was to first enable the Administrator account, and then use that to repair the system.

    You need to reboot the computer in "Safe Mode with Command Prompt" - press F8 as the computer is booting (just before it says "Starting Windows" - it may take a few attempts to time it right) and select it from the menu.

    When you get a command prompt shown you need to type the following:

    C:\> net user Administrator /ACTIVE:YES 
    C:\> net user Administrator letmein

    Then you can reboot and you should have a new icon for logging in - Administrator. Click that and enter the password "letmein" and you should now have access to the computer as the administrator.

    You can now use this account to either fix your old account (check the profile location and things) or create a new account and copy your files over from the old one.

    The latter is probably easier.

  • DragonLord

    See this Microsoft Knowledge Base entry: Error message when you log on to a Windows Vista-based or Windows 7-based computer by using a temporary profile: "The User Profile Service failed the logon. User profile cannot be loaded"

    This may be caused by your user profile having been manually deleted without removing the associated registry entry. Given that you are using temporary profiles, boot into Safe Mode, enable the Administrator account as Matt Jenkins described, and use it to make the necessary changes as given by the KB entry. After you're done, remove the password and disable the system Administrator account:

    > net user Administrator /ACTIVE:NO
    > net user Administrator ""

    You should also have a separate password-protected administrator account, independent of the system Administrator account and accessible from the logon screen outside of Safe Mode, to recover the system from these types of problems.

  • Related Question

    login - Windows 7 logging off standard users
  • massimogentilini

    I've got a Windows 7 installation with 2 users, one administrator and the other is not. If I try to logon with the standard user it show the Welcome Screen and then logs them off immediately. If I logon with the administrator user or if I set the standard used as an administrator it works without problems.

    Any idea what may be causing this?

    Windows 7 Ultimate running on a netbook, AVG Antivirus, no special software or any other specific configuration.

  • Related Answers
  • Vervious

    Well, this is hard to diagnose/solve since there really isn't any information and its not very widespread...

    Does it happen in safe mode? And does this link by chance help in any way?

    And make sure this file C:\WINDOWS\System32\Userinit.exe exists. Apparently if you have AVG free installed it might have destroyed it and messed with login.

  • Anne

    I have had the same problem. Looking for a solution, i followed the link given by Nano8Blazex.

    The instructions by Microsoft Support led me to the registerkey for the location of userinit.exe. The value contained not only the location in the Windows\system32 directory, but also a location which was added by HP ProtectTools. The software was already deleted before i discovered the logon problem, but apparently this register value was left behind.

    Deleting the ProtectTools location from the value, leaving only the windows\system32 location, solved my logon problem.

  • 8088

    I had exactly the same problem:

    • Removed the standard users and made new ones; didn't work.
    • Error-checking; didn't work.
    • Kaspersky Antivirus full scan; didn't work.
    • Reinstalling Windows; didn't work.

    I installed the free Ad-Aware Internet Security application by Lavasoft and ran a full scan. It found some malware - after restarting the PC the problem was completely gone.

  • Andy P

    I had this problem today and also created a new profile. I ran malware bytes in the new profile, which picked up and quarantined a trojan. I logged back into my original profile and the problem is now gone.

  • Ian Boyd

    My first thought was check the event log.

    My first hypothesis is that there is a misbehaving program that is set to run on login. This program is trying to perform some operation that mistakenly thinks it requires administrative access. Because it cannot do what it wants, it assumes that some file is locked, and initiates a logout to try to release the file lock.

    Try starting the computer in safe mode, or use msconfig to run a Diagnostic Startup, so that everything else is disabled.

    My other theory is that anti-virus is causing problems. i have no evidence to support that at this time: except that nearly every PC problem i've ever seen is related to anti-virus/security products in some way.

  • Dave Rook

    I had the same problem yesterday. I installed ESET NOD 32 Antivirus and after that, every time I opened my computer and chose my profile (administrator), it started logging off. I was then stuck on the log on screen.

    What I did to fix it is start in "SAFE MODE", went to my profile, created a new profile, and deleted the old profile. It's fixed now.

  • Samashan

    Remember guys, using regedit improperly can harm your computer.

    windows key+r type regedit in the box click okay go to HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows NT>CurrentVersion>Winlogon

    look at string userinit it should look like this with the trailing , C:\WINDOWS\system32\userinit.exe, if not change it , coz if it doesn't, you have a virus infecting that file. Cheers :-)

  • Jawa

    Any modification to the registry key HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > Winlogon -> Userinit can cause this issue.

    Now, the modification may be done by a malware or some OEM bloatware installed by the system manufacturer. In my case, the client had HP security tools installed, which modified the key with a protect tools entry along with C:\WINDOWS\system32\userinit.exe. Uninstalling the protect tools program will not help. You have to navigate to this registry key and delete the HP Protect tools part, leaving just the C:\WINDOWS\system32\userinit.exe part.

  • Zombie Slayer

    I had the same problem when I made an extra account for some one else. What I did was I scanned my computer for spy/mail-ware and I came up with a trojan. Then what I did was I did what Samashan suggested and I went to regedit and I found that there was all this extra crap at the end of the registry userinit.exe. right clicked to modify it, deleted all of it and made it "C:\WINDOWS\system32\userinit.exe". Then I was able to log on as the other user. Hope this helped every one!