codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

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!

What was I thinking, putting a SPACE in my PC’s User name?

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.

https://social.technet.microsoft.com/Forums/windows/en-US/cd35f292-616a-4622-96cb-19138a59d7e8/changing-username-variable?forum=win10itprogeneral

Hope this reference helps!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Natalie Olivo

Full Stack Data Scientist/Machine Learning Engineer

Responses (6)

Write a response