User name different that file explorer name


Atom

Active member
Local time
8:32 AM
Posts
43
OS
Windows 11
It's possible to have the file explorer user name be one thing, and the user account name be another. In the case you want them to be different (not suggesting that is a good idea), does each one have its own environment variable. Can you programmatically determine the name that file explorer is using if it's not the same as %USERNAME%?
 

My Computer My Computer

At a glance

Windows 11i7-10700K16GbIntel Onboard graphics
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Self
CPU
i7-10700K
Motherboard
Ausus Prime B460M-!
Memory
16Gb
Graphics Card(s)
Intel Onboard graphics
Sound Card
None
Monitor(s) Displays
1
Screen Resolution
1920x1080
Hard Drives
Samsung 970 EVO Plus NVMe M.2
PSU
EFGA 550 G2
Case
None
Cooling
CPU stock cooler only
Keyboard
Razer Black Widwo
Hello,

The default is for Windows to use the first five letters of your Microsoft Account as the User name. You can add new users to the computer, or you can change the existing Account name or change the folder name. Please follow these Forum tutorials for how to make those changes:
Change User Account Name in Windows 11

Change Name of User Profile Folder in Windows 11
 

My Computers My Computers

  • At a glance

    Windows 11AMD Ryzen 5 560016 GBSapphire Radeon RX 6500XT (8 GB version)
    OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • At a glance

    Windows 11Intel Celeron N4020
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
It's possible to have the file explorer user name be one thing, and the user account name be another
Yes

does each one have its own environment variable
No, it's more complicated than that.

Can you programmatically determine the name that file explorer is using if it's not the same as %USERNAME%?
Unless you have stepped in and changed account setup, it will be %USERNAME%
For a procedure, please see From FullName-Name through SID to UserFolderPath [my post #12] - TenForums


Denis



Welcome to ElevenForum.

It's really worth making time to browse through the ElevenForum Tutorial index - there's a shortcut to it at the top of every ElevenForum page [within the Tutorials dropdown list].
- At the foot of the ElevenForum Tutorial index is a shortcut to download it as a spreadsheet.
- I download a new copy each month.
- By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
- ElevenForum tutorials are also listed at Tutorials and there's a shortcut to that at the top of every page.

You can search ElevenForum using the search box in the top-right corner of all ElevenForum webpages or using Advanced Search - ElevenForum
- You can also search ElevenForum threads in many general search engines, such as Google, by adding site:elevenforum.com after your search term. For example,
Taskbar setup site:elevenforum.com
- [This is what the search box in the top-right corner of ElevenForum webpages does automatically]
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
Thanks for all the helpful replies. I don't like that MS forces you to use a particular user name when you install Windows11. I have 4 or 5 windows computers in my home office and having each one with the same Windows user name would not work for me. I also do not like how sticky OneDrive is. I don't use it or want to use it and getting rid of it is not as straightforward as I would like. It should be something you can add if you want but should not be installed automatically.
 

My Computer My Computer

At a glance

Windows 11i7-10700K16GbIntel Onboard graphics
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Self
CPU
i7-10700K
Motherboard
Ausus Prime B460M-!
Memory
16Gb
Graphics Card(s)
Intel Onboard graphics
Sound Card
None
Monitor(s) Displays
1
Screen Resolution
1920x1080
Hard Drives
Samsung 970 EVO Plus NVMe M.2
PSU
EFGA 550 G2
Case
None
Cooling
CPU stock cooler only
Keyboard
Razer Black Widwo
If you use the Clean install tutorial procedure then you can create a local account with a name of your own choosing.
You can later convert that into an MSAccount-linked user account if you want and the C:\Users\Username folder path will not change.

Clean Install Windows 11 - ElevenForumTutorials


Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
What Denis said. Using a local account gives you much more control. OneDrive will not automatically start syncing and your folder name will match your username. Stick to a single word username. Windows will allow a space, but a space in your user folder name can trip up some software.

You can create a local username at build time by entering something like "a" for the email and password. You will then get prompted to create a local account.

Any existing Windows login account can be switched to a local account by creating a new local account, logging in with that account, and then moving files from old to new folders. Do not attempt to rename an existing account folder name, regardless of what any tutorials say. It usually goes sideways.
 
Last edited:

My Computer My Computer

At a glance

Windows 10/11
OS
Windows 10/11
Computer type
Laptop
Manufacturer/Model
Acer

Latest Support Threads

Back
Top Bottom