The environment variable USERNAME is defined in the registry key HKEY_CURRENT_USER\Volatile Environment. Note however that as the keyname implies, the variables in this key are volatile, meaning that while the user can change them, they will not retain their new values and will be overwritten by the system with derived values (sort of like registry RAM). The username environment variable is ...

Understanding the Context

I'm a Windows 7 user i used to change the username from the control panel. But I would like to know how to change it using the CLI not the GUI I have searched alot but didn't find the answer or it ... The username is only truncated if you are linked to a Microsoft Account. So, the easy solution to this problem is to unlink the Microsoft Account, when prompted for a username enter the full username you wish to use.

Key Insights

Once you logout of the profile and log back into the profile, the user's profile directory, will reflect the name you entered in the prompt. At that point you can link the user to ...