Help! I put a space in my Windows User Name. Now What?
As much as I’d love to only be working on data with 100% of my time, sometimes I’ll find myself needing to solve different kinds of problems. Here I document the resources I used to fix a mistake I made: Putting a space in my new PC’s User Name.
I made a mistake within the first five seconds of turning my new Windows 10 on: I put a space in my username!

This screen doesn’t suggest you’re making any huge commitments, but in fact, you are. The User name you select here will be what your Windows uses as an account name, user profile folder name, and the %USERNAME% and %USERPROFILE% variables. For more information on why spaces are a bad idea, check out the answer to this StackExchange question by tohster.
Why does this matter if any of these are “Natalie Olivo” versus “nmolivo”?
Some packages have trouble installing and working properly when you have a space in your %USERPROFILE%, for example: git and Spark, two programs I use almost every day.
The simplest way to solve this is to delete the account and make a new one. If you’re like me and already began making this account everything you ever wanted and you don’t want to lose that work, continue on.
There are three steps I followed before I was completely out of the woods and able to get my PC working again.
First I activated the Administrator Account
I needed to do this because you can’t modify filenames that are in use. Since the account I created with a space in its name was the first and only account to exist, I activated the Administrator Account using the command line.
Next I changed the User Profile Folder
This makes it so your %USERPROFILE% variable changes. This will be important for your Environment Variables to work. If this is not properly set, your %USERPROFILE% sets to a TEMP directory.
I thought I was done! But there’s still one last step after this.
Finally, I changed the username variable
In the first answer on this forum by user CFischer_Dev, they highlight how to check the %USERNAME% variable from the command line.
Hope this reference helps!