The scenario: a user has a corrupt Windows profile. We don’t want to delete the profile because it may have valuable data. We need to give the user a new one.
- Log into the PC as a different user, an administrator.
regedit. Paste the following in the registry location bar near the top:
- And hit Enter. Then Find (Edit/Find, or Ctrl-F) the username of the user you are working on.
- In the left pane, rename the container to .OLD
- Rename the user’s folder in
C:\Users to .OLD as well.
- Log off, and log on as the user.
This, in Powershell:
Set-LocalUser -Name "pcunlocker" -PasswordNeverExpires 1
When you encounter a user account that spins forever trying to sign in on a computer that already has a local copy of their profile, here is a few steps to resolve the issues quickly without either data loss or the need to create a new Windows profile:
- Sign in on an account with Local Administrator rights
- Navigate to “C:\Users”
- Locate the profile folder of the user unable to sign in.
- Rename the folder (Usually I add “.old”)
- Sign out
- Sign in as the user who’s profile has not been working
- While signed in on this temporary profile, navigate back to “C:\Users”
- Rename their profile folder back to what it was originally
- Sign out
- You should now be able to sign in normally to that user with their profile intact.
Contributed by the excellent Joe Busby.
So we have a terminal server or other multi-user Windows machine, Windows 7/2008R2 or later. We want to pin one or more icons to the taskbar, for all users. We discover that this is not something extremely easy to do :-) We can, at least reasonably easily, set up the same taskbar icon set for all users, thusly:
- Log into the one machine, and set up the taskbar as you would like it to appear for all.
- Export the following registry key:
to a file named
TaskBarPins.REG. Put it in a permanent folder outside of user space, e.g.
C:\AutoSettings, it will be imported automatically at every login.
C:\AutoSettings, containing the following text:
On Error Resume Next
Dim objShell, ProgramFiles, sRegFile
Set objShell = CreateObject("WScript.Shell")
sRegFile = """C:\AutoSettings\SetTaskBarPins.REG"""
objShell.Run "Regedit.exe /s " & sRegFile, 0, True
Set objShell = Nothing
- Create a shortcut to
The next time any user logs into this machine, nothing will appear to have been changed. But when they log off and then log on after that, their taskbar will be the same as the one you exported.
Sometimes it will happen that the Default profile is corrupt. This will make it impossible to log in on a PC as a new user, the system will be unable to create a new user profile. Here is a solution:
Not tested yet, but looks very intriguing:
NET USER <USERNAME> /DOMAIN /ACTIVE:YES
Here is a detailed fix:
The gist of it is, one browses in ‘regedit’ to here:
and one will find that the GUID key for the profile, is suffixed ‘.bak’, and replaced. One needs to remove the replacement, rename the .bak removing the suffix, and restore the ‘state’ entry from ‘8100’ hex (which means temporary) to ‘100’ hex (normal).
If the profile itself is corrupt and the goal is to replace it altogether, just remove all of the keys with the username within, including the .BAK if it exists.