share
Super UserHow to rename user folder in Windows 8?
[+172] [9] Dzinx
[2012-10-29 09:04:49]
[ windows-8 microsoft-account ]
[ https://superuser.com/questions/495290/how-to-rename-user-folder-in-windows-8 ]

When I log in on a Windows 8 machine for the first time with my Microsoft Account (by providing an e-mail address), a new user folder is created:

C:\Users\dzinx_000

In previous versions of Windows, I could choose the name of this folder (it was equal to my username). As I use the commandline often, it is quite annoying to me.

(1) I would assume that simply trying rename the folder would break things. - ChrisF
As a workaround, you can use the %userprofile% environment variable as a shortcut to your user folder. So cd %userprofile% is equivalent to cd C:\Users\dzinx_000. - Indrek
(1) @ChrisF yeah, that's what I'm suspecting, that's why I'm asking :) - Dzinx
Can you log in as another user and rename the original user? - ChrisF
@ChrisF I don't know, I'm afraid to try :) - Dzinx
(1) I just found out that while it's difficult to change an already existing username, it's easier to choose one when logging in with a Microsoft Account for the first time -- see my answer - Dzinx
(1) Also check out this link & MSKB. - avirk
I found something when digging the settings the other day. I'll see again and let you know. I actually changed my username. Windows put it to Pratyush. I made it to Pratyush Nalam. Although in my case, no annoying _000 was there - pratnala
@ChrisF: Yes it does, you'll be logged into a temporary profile afterwards. - Oliver Salzburg
[+185] [2012-11-04 14:04:06] Oliver Salzburg

There are two different approaches, depending on if you have ever used the Microsoft account on the given computer:

I have already logged into that account

  1. Create a local user account with administrative privileges if you don't have one already.

  2. Reboot.

  3. Login with local account with administrative privileges.

  4. Win+X, G (Computer Management) → System ToolsLocal Users and GroupsUsers, right-click user, Rename.

  5. Win+X, A (Command Prompt (Admin))

    ren C:\Users\dzinx_000 dzinx
    
  6. Win+X, R (Run)

    regedit
    
  7. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ and find the SID for your user account. You can simply open each folder and check the ProfileImagePath for the correct one.

    Rename the ProfileImagePath value to your desired name, like C:\Users\dzinx

  8. Log in with your Microsoft account. Everything should work fine:

    enter image description here

I have never logged into my Microsoft account

To start of, we only have one, local user account:

enter image description here

I'm now going to add my Microsoft account.

enter image description here

Now we have our Microsoft account. Let's open the Computer Management from the lower left corner.

enter image description here

Here we can see our new garbled user account:

enter image description here

Rename it!

enter image description here

You may note that no folder in C:\Users exists at this point in time.

enter image description here

Now log in with the new user account.

enter image description here

Now my Microsoft account is named "superuser" locally and the profile is stored in C:\Users\superuser

enter image description here

I don't have the Professional edition :(

In the standard edition of Windows 8, the Local Users and Groups snap-in is not available.

In my tests, the following procedure worked out well. Your mileage may vary!

The procedure is identical to what was outlined under I have already logged into that account, except that I didn't use the Local Users and Groups snap-in. Instead, I went right for the command prompt and renamed the profile folder. Afterwards, I adjusted the ProfileImagePath key in the registry.

Additionally, I searched the whole registry for the full path of my userprofile (C:\Users\Username) and replaced all entries with the new folder name.

I couldn't detect any problems after rebooting and logging in with the renamed account, but, as I said, your mileage may vary.

What happens when I simply rename C:\Users\abc to C:\Users\xyz?

After logging in with the affected user, the user will be logged into a temporary profile:
enter image description here
enter image description here


(1) The most comprehensive answer! And it's easier to create user associated with Microsoft account, rename it before first sign in. - Alexey Ivanov
Is it not easier to create a new user account with the correct name, log into that one, migrate the old user profile to the new one, then delete the old account? Or is it not in W8? - Moab
@Moab It's a bit different with Microsoft accounts. Unless I'm misunderstanding. - Oliver Salzburg
@OliverSalzburg you are right, they are asking about a Microsoft account. - Moab
(3) looks like this WILL NOT WORK on windows 8 standard edition...being that there is not users and groups - mjrider
(3) If you have picture password enabled with a pic in your profile folder which you want to rename, you will not able to do the 5th step, because the picture is using the folder. Just reboot again so the default login is not the one you want to rename... - kissgyorgy
I've changed the registry entry as described above because I had already started using the account. There is however a problem whenever I install new applications it still remembers that old username from somewhere and is the default location sometimes when saving User folders... Where else is it getting this information? - user64908
@user64908: You might want to check with Process Monitor and possibly open another question. - Oliver Salzburg
(1) I got "access denied" after step 5 (I use Microsoft account to log in). Is there any workaround? - KiL
@KiL: Are you performing the operation from an elevated command prompt? - Oliver Salzburg
Yes. I logged into a local admin account and use admin cmd to type rename command but it prompt "access denied". My user folder has a non-english character so I want to rename it. - KiL
@KiL: You could retry it in safe mode. If that doesn't work either, you may want to open a new question. - Oliver Salzburg
(1) The steps under "I don't have the Professional edition :(" didn't work for me. No matter how many times or ways I tried, I couldn't get all of the registry edits to stick after rebooting - they keep resetting to the original name. So I can definitely confirm YMMV. - Kevin K
Also, you may want to update the values in... HKEY_USERS\{{user_guid}}\Software\Microsoft\Windows\CurrentV‌​ersion\Explorer\Shel‌​l Folders - roadsunknown
And in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\‌​Explorer\Shell Folders too. I had a couple of problems with my software because it was unable to find user-related directories until I changed values there. - Roman
(4) Good for newly created account. Though for new account it is easy to ditch it and create local account then link to MS one. There are many applications that keep an absolute path in the registry. If you do want to follow this answer, you'd have also to search & change all registry entries with your former folder path. Search first to assess the amount of work! For example, Dropbox will be a pain. Few Lenovo apps still write to old location for me. So it still needs to be paired with symlinking. - mlt
Hi, I followed your instruction and I got stucked with the temporary profile thing and somehow I lost all my files. Do you know if windows keep those stored somewhere? Thanks - Blackbelt
Same problem as @KIL, "access denied" in step 5. Any update on how to solve that issue? - Igor Vaschuk
I used netplwiz to change my username in addition to the above steps. - pqn
Works under Windows 10 Professional. Thanks a bunch! - Little Helper
"I have already logged into that account" instructions work under windows 10 pro - Alec Istomin
1
[+16] [2012-10-29 09:08:21] Bob

You could create a symbolic link to the folder. Symbolic links will transparently redirect.

Use mklink (as administrator) to create a symbolic link:

mklink /d C:\Users\dzinx C:\Users\dzinx_000

That IS kind of a solution, but the old username will still pop out in many places. Maybe there's a possibility to completely change the username? - Dzinx
(2) @DzinX In previous versions of Windows, you could edit the subkeys of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList in the registry. One subkey will be for your user SID, and then you just change its ProfileImagePath value and rename the folder. However, this setting is just for Windows (and untested on Win8, but assumed to work). It is the path used to set %userprofile% on login, but badly coded programs may save the absolute path to your user profile and will break. I'm also uncertain how Modern UI apps will react, though I guess it depends, once again. - Bob
Huh, so if I both created the symlink AND changed registry settings, nothing should break but I shouldn't see dzinx_000 too often, right? - Dzinx
(2) @DzinX I guess it would be safest to change the main folder to dzinx through the registry (and rename) and then create a symlink from dzinx_000 to dzinx. That way, only programs that specifically request the symlinked folder will use it. Of course, you could also try not having the symlink and see if anything does crash, then add it later. - Bob
(1) If you have renamed a profile and fixed up the registry, making a link is a good practice to make sure that any references to c:\users\oldname will still work. In theory you can crawl the registry and any config files to find them, but it is possible that you missed something. - myron-semack
There are some obscure programs that will choke on symbolic links, but it is rare - Jonathan
2
[+7] [2012-11-03 14:10:03] avirk

This guide is for Windows XP/Vista so try it at your own risk. I can't test it because I don't have a MS account.

Before we begin create a restore point or backup of your system drive. Backup your full registry in any case of data corruption.

Though you can move or rename the user profile folder, there may be some side effects after using this method. This is because of the reason that there may be some absolute path references (to the old user profile folder) in the registry added by third-party software. Therefore, there may be a loss of functionality in the respective applications.

I got this information from Change the Registered User and Company Name in Windows XP / Vista [1].

If you have to rename your registered UserName then you have to edit the registry keys. For open the registry just press the Win+R and type regedit and navigate to following path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

No at the right panel you will see the two editable entries RegisteredOrganiztion & RegisteredOwner.

enter image description here

In order to change either of these fields double click the field name and enter your information in the Value data section and click OK.

If username folder has renamed and your programs are working fine then its OK, otherwise change the profileimagepath to the name you have given to the RegisteredOwner

For this navigate to the following path in registry:

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

enter image description here

[1] http://www.petri.co.il/change_registered_user_and_company_vista_xp.htm

Did you at least try to do it yourself in XP or Vista? - Dzinx
@DzinX unfortunately I don't have both. I'm running the Win 7 without MS account and have Win 8 trial version. You have to give it a try at you own hand if you want to. - avirk
@DzinX I think you should have to try it on VM first. I do if I would have a MS account. - avirk
(3) They key part of the answer is changing the ProfileImagePath through the registry. The other registry values are unrelated. - Oliver Salzburg
@OliverSalzburg did you try to change the user name through it? If that works I'll edit the answer. - avirk
(2) @avirk: The user name has to be adjusted through other means. The values RegisteredOwner and RegisteredOrganization are unrelated. See: howtogeek.com/howto/windows-vista/… - Oliver Salzburg
3
[+4] [2012-11-04 00:29:58] JustEl

From couple of hours spent researching this problem I came to a conclusion that you CAN NOT change the user folder name. Well you can but you would have to spend alot of time editing thousands of registry files. Best way to fix this is to create a new Administrator account and delete the old one. Hope this helps.


Then you'll spend hours tweaking all the settings on the new account. - Dmitry Grigoryev
4
[+4] [2012-11-07 05:54:31] askvictor

A somewhat long-winded approach (but one that might work) would be:

  • use Windows Easy Transfer to 'backup' the entire user account
  • delete the user (and optionally files) from the system
  • create a new local only (i.e. no Microsoft account) user account
  • log in once as that user
  • restore the easy transfer data - map the old user onto your newly created user
  • change the account type of the new account to a Microsoft account (PC settings -> users -> Switch to a MS account)

5
[+4] [2013-08-16 09:39:23] Andrew Xiang

Some sub-keys under

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

should also be updated.

Otherwise, some links in "Start" or "all apps" won't work, like Command Prompt.

(Windows Server 2012)


Had this problem with IntelliJ IDEA - Mene
6
[+2] [2013-06-25 04:56:32] hkp

For those who do not have Windows 8 Professional, there is a way to rename the old account using command line:

Open command prompt with Right Click → Run as Admin. In command prompt window, type

net user 

and verify the old account name, ie userA. To verify that the old account is an administrator, type:

net localgroup administrators

verify old account name is under C:\Users\userA. To rename the old user account:

wmic  useraccount  where "name='userA'" rename olduserA

Then if successful, verify the name has changed, type

 net user

Verify that C:\Users\olduserA shows up now. Then go to Control Panel → User Accounts → and rename the old user account display name

Then you can copy this renamed account to a newly created account if needed, skipping NTUSER.DAT* & NTUSER.ini files.

This is the method I used for a corrupt user account profile. First logged in as Administrator on win8 home, then renamed the old user account, changed the display name of old user account, created new user account with admin privs, created C:\Users\newacct and then copied most files/folders from old account C:\Users\oldacct to C:\Users\newacct. Changed the permissions on C:\Users\newacct to give full access to the newacct, removed Everyone. Then rebooted and then logged in as new account.

Voila! User profile corruption fixed!


7
[+1] [2013-01-11 11:56:05] Gokstad

I think there is a more simple way to do this.

Go to regedit > Current User > Identities

Click on your username and change "Main identity" to the name you want.


8
[+1] [2014-01-09 21:20:40] Jim

Only good for deleting folders - I was able to delete the user folder in Windows 8 by going into safemode: http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode

then going to windows explorer - Window key + E - then double click C drive - then double click users file. Then right click on user to get rid of and delete. I had removed the account through control panel - user accounts and family safety - user accounts - remove user accounts. I had also tried to delete the user files through windows explorer first which deleted most of the subfolders. Probably best to be logged in as administrator. I would guess you can rename file that way as well. Hope this helps.


This is good for deleting files but I found that it screws up all your programs and settings and starts as preparing windows again. You need to be logged in as administrator from an account other than the one you want to delete or rename so you may need to set up additional accounts with administrative settings rather than standard first. It also screwed up my - Jim
9