Windows 10 - Username with whitespace and PATH
See this KB article to change the name of the User Profile directory.
After you do this, you may want to make a link just in case any of your apps keep local path configuration.
cd C:\Users
mklink /D "Miha Šušteršič" M.Sustersic
You can actually change the folder name. It's a bit tedious but it's worth it. Make sure you know of the edition of your Windows 10 you're using first - Professional, Enterprise or Home - before carrying out these steps, cos of step 5:
- Right click on Windows Start Menu option and click Command Prompt (Admin)
(If you can't find Command Prompt (Admin) when you right-click on the Start Menu or search for it, you can simply go to C:/Users/Default/AppData/Local/Microsoft/Windows/WinX/Group3
on your pc. There, you'll find two shortcuts both named "Command Prompt"; one is for Command Prompt, and the other is for Command Prompt (Admin).Try out both shortcuts to know which is which, and then click on the one for Command Prompt (Admin))
In the Command Prompt (Admin), create a new/temporary admin account by entering this command:
net user Administrator /active:yes
(Notice the space betweenAdministrator
and/
) and close the cmdNext, click on the start menu and sign out of your current admin account (four icons above the shut down button)
Sign in with the new Administrator account you just created
(Skip this step only if you use the Windows Home Edition) Right click on the Start Menu and click Computer Management and open
Local Users and Groups > Users
. Right-click on the username you wish to change and select Rename and close the window.Open
Local Disk (C) > Users
and right-click and rename the corresponding folder with the name you wish, just as in Step 5, and close the window.Next, search for regedit in the search box and click on it. Now, inside the regedit (i.e. Registry Editor), go to
HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > Current Version > Profile List
.
In the list of identifiers under Profile List
, find the ProfileImagePath that corresponds to the account name you wish to change. Yours should look something like this:
ProfileImagePath REG_EXPAND_SZ c:\Users\Miha Šušteršič
.
Double click on the value and rename it to what you want.
- Still in the regedit, scroll up to the top of the window and make sure the highlight is on
Computer
, then clickEdit
in the menu options just above it; then clickFind
; then enterC:\Users\<your old username>
. In your case, that would be:
C:\Users\Miha Šušteršič
And search.
If the search brings out any result (i.e. any folder bearing your old account user name,) click on it and rename it, and then go back to
Edit
in the menu option and this time, clickFind Next
or f3. Keep on "Finding Next" this until there are no files are left to rename, then close regedit.Finally, sign out of your Administrator account and sign in with your now-renamed account, and then, go on to disable the Administrator account you just signed out from. You do this by going to Command Prompt (Admin) and this time, you enter the command:
net user Administrator /active:no
(Once again, notice the space between Administrator
and /
)
...and close the command.
And that's it! Long and tedious, but it works. You can check also out this video to have a better understanding of everything I just described.
_Note: Make sure to follow every step to the letter so you don't run into more serious problems.
If you run into any issues renaming at Step 6, simply shut down your computer and restart and try again.
Also, certain files may/will not allow for renaming. It's alright; just leave them as they are and "Find Next" until there's no more file to rename._