因为是用微软账号登陆的,所以用户文件夹的名称很奇怪。所以搜索了一下,根据 https://superuser.com/a/1346983 这里的回复进行了修改,引用如下:
Microsoft has actually documented a very simple and clean way to
rename a user profile folder.There is no need to create a new user account, so all the settings
associated with the existing user profile are preserved. And the only
registry change required is to edit a single string value (the one
that tells Windows the path of the user profile folder):Log in by using another administrative account. Note You may need to
create a new Administrative account at first.Go to the C:\users\ folder and rename the subfolder with the original
user name to the new user name. Go to the registry and modify the
registry value ProfileImagePath to the new path name.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList<User SID>
按照这个方式进行修改,可以正常重新进入系统,但很多程序用不了了,在此记录一下修改的过程:
- 用户名没改掉,运行lusrmgr.msc,修改掉即可。
- cmd中无法使用python,因为在环境变量中path里面加路径的时候是用的绝对路径,直接修改环境变量即可。
- 右键用VS打开失效,找到VS的路径,使用卸载的程序。之后重新安装。
- 打开注册表搜索原来的文件夹名,该修改的修改掉。
- WPS网盘用不了,直接重新安装WPS(之前尝试:找到WPS的安装路径,找到utility文件夹里面的install.ini进行修改,运行卸载程序,将其卸载掉。这样没用)
- pip用不了,可能因为pip是个alias,直接重装pip:
python -m pip install pip -U
。 - IDLE用不了,系统备份会出错,直接重建了链接:
mklink /d C:\Users\wise3 C:\Users\HenryFox
据 https://www.zhihu.com/question/50571912 说,可以在微软上改账户昵称,改短点(不超过5位)。