You are running Windows 8.1
You have an existing local Windows user account named Alice that you'd like to rename to Bob, including the associated user profile folder
There is no (nor ever has been a) user named Bob on your machine
You have an existing admin account named Eve
Backup, backup, backup (and know how to restore if things go wrong)
Log in to Windows as Eve (if Fast User Switching is enabled, make sure Alice is logged out completely)
Control Panel\All Control Panel Items\User Accounts > Manage another account > Alice > Change the account name > Bob > Change Name
Rename C:\Users\Alice to C:\Users\Bob
Do a batch search and replace in the registry1 of C:\Users\Alice to C:\Users\Bob with a tool like Advanced Regedit (win32)2,3
Create a symbolic link5,6 to maintain compatibility with hard-coded references to C:\Users\Alice7:
C:>mklink /d C:\Users\Alice C:\Users\Bob
Most guides, including Microsoft's own Renaming a User Account Does Not Automatically Change the Profile Path, only mention updating the value data for ProfileImagePath in the corresponding S-1-5... subkey of HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList:
However, there are invariably many more references to the old path which need updating, especially since most guides (including Microsoft's) also fail to include step 6 above (symbolic links).
Or with a batch file or PowerShell script: Registry: find and replace part of a path in a batch file / PowerShell Registry Find and Replace
On a crufty, heavily-used system, removing all occurrences of C:\Users\Alice from the registry required using two additional batch search and replace tools, Registry Toolkit and Registry Replacer.
For longer usernames (e.g., AliceSmith), values containing the short path name (C:\Users\ALICES~1) may also be present and require updating.
Symbolic Links vs. Junctions vs. Hard Links
If you ever decide to delete the symbolic link, be very careful: "If you have a symbolic link that is a directory (made with mklink /d) then using del will delete all of the files in the target directory (the directory that the link points to), rather than just the link. SOLUTION: rmdir on the other hand will only delete the directory link, not what the link points to."
From a comment by GuitarPicker: "[T]here may be some other programs which store the paths elsewhere, such as an .INI file, .XML file or a database."
Sources & more:
How To Move The Windows Users Profile Folders describes another method, employing a new user account and xcopy.
last update: 2018.03.22