Default username when installing new software

Joined
Apr 16, 2016
Messages
27
Reaction score
3
When I first set up my Win 10 PC, I chose a name (call it "Fred") as the initial local admin username.
I subsequently found I needed to change this as I had some software to install that was licensed to the name "Fred Blogs".
It failed to validate under the name "Fred".
I created a new user named "Admin". After logging in as Admin, I deleted the user "Fred" and created a new user named "Fred Blogs". I also deleted the files and folders under the original C:\Users\Fred. That fixed the licensing validation issue.

However, now whenever I install new software, the default username automatically entered into the installer dialog still appears as "Fred". I assume there must be a registry entry containing this information that I need to edit or delete.
Does anyone know where this information is stored?
I've tried searching the registry but found nothing obvious. There are a couple of entries that refer to the old user directory path i.e. C:\Users\Fred but those entries appear to be protected so I can't edit or delete them. In any case, I'm not convinced the default username would be derived from a directory path.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Hi Brian,

The Default User Profile is actually contained in a Hidden folder under C:\Users

Assuming you have opened C:\Users you'll need to:
  • Click File | select Change folder and search options | click View tab | then check "Show hidden files, folders, and drives" | click Apply

In terms of manipulating that hidden folder its best done via a Windows install disk and using audit mode. The process is relatively simple, but how to get into Audit Mode is a little tricky as it involved not clicking the two options presented to you in the Window, but rather bypassing that via a series of Keyboard actions.

I'll go into that later on if required.

Regarding your thoughts on a Registry entry

When you rename a profile the ProfileImagePath for the original named profile will not change in the Registry (this is by Design - Official comment from Microsoft). You can manually rename these paths if you want to but it'd be wise to make a System Restore Point first as manual edits if done wrong can create more troubles.

Note: Before doing this confirm the %homepath% folder name. (i.e. C:\Users\<user name>). If modifying the sub key's ProfileImagePath Value data, the name you enter their must match the user name of your %homepath%

To manually edit the ProfileImagePath, do the following:
  • Press Winkey + R
  • Type regedit | click OK
  • In the left pane of Registry Editor expand the HIVES like so:
HKEY_LOCAL_MACHINE
>SOFTWARE
>Microsoft
>Windows NT
>CurrentVersion
>ProfileList​

  • At this point if you expand ProfileList you will see a series of folders with names that begin S-1-5
  • You'll need to left click on each one to view its content in the right pane
  • In the Right Pane check the Data column next to ProfileImagePath
    • If you see C:\Users\Fred then:
      • In right pane right click "ProfileImagePath" | select Modify
      • Replace Value date: C:\Users\Fred with C:\Users\Fred Blogs
      • Click OK
      • Press F5 to refresh Registry
    • Once done close Registry Editor | Restart computer

I'm not guaranteeing this will resolve your issue, but there is certainly no harm in trying it out to see whether the issue resolves itself.

Notes: For any Hive you manipulate the ProfileImagePath for, before doing this you could do the following:
  • In the Left Pane click once on the Hive you are about to manipulate | then in top tool bar click File | Export
    • Enter a name to help you recall what this Export is then click Save
    • If the editing does not help or things end up worse, you can right click the saved REG file and select Merge, the when prompted click Run, Yes, Yes, OK to reset the Hive to its original state.
  • Alternatively use the System Restore Point I recommended you create before doing the above
Regards,

Regedit32
 
Last edited:
Joined
Apr 16, 2016
Messages
27
Reaction score
3
Hi Regedit32,

Thanks for the reply.

First of all, I am not actually using the Default User Profile. I was installing software after logging in as the new user named "Fred Blogs". So I don't think this affects my issue.

Secondly, I did not rename the user "Fred" to "Fred Blogs". What I did was delete the user "Fred" and create a completely new user "Fred Blogs". In doing so, there is no need to modify the ProfileImagePath in the registry.

BTW: It appears that the OS does not clean up the registry when a user is deleted. A search through the registry reveals there are still references to the ProfileImagePath for software that was installed by the deleted user (In my case C:/Users/Fred). As I mentioned previously, some of those registry entries appear to be protected. I'm not sure what the effect would be if I did manage to change or delete them, so I've left them untouched.

My original question remains. I will attempt to reiterate to make it clearer...

Most software installers present a dialog box in which you are asked to enter things like Username, Organisation, Serial Number etc. An initial default Username is usually automatically filled in by the installer.
You can obviously change this default name before continuing with the next step of the installation.
I would expect the default Username to be that of the logged in user carrying out the installation.
In my case, If I login as "Fred Blogs", I would expect the default name to appear as "Fred Blogs".
Instead I get "Fred". Why? Where does this string come from?
Is it something that was left over in the registry from before the original user "Fred" was deleted?
It's as if whatever name you gave to the initial user when you first set up Win 10 cannot be removed.
My "Fred" user seems to be immortal an cannot be killed!
I would hope it's not doing something stupid like truncating the username for the logged in user by limiting it to a certain number of characters or treating space as a delimiter?
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
An initial default Username is usually automatically filled in by the installer

Hi Again,

In the Registry the RegisteredOwner in your scenario may be Fred. If that is the case its this string a Software Installer is grabbing to initialize that Splash Screen you referred to with Name, Organization etcetera.

That would be located here:

HKEY_LOCAL_MACHINE
>SOFTWARE
>Microsoft
>Windows NT
>CurrentVersion​

If you left click on CurrentVersion you will see in the Right hand pane a REG_SZ entry called RegisteredOwner

You can right click that | choose Modify | and change the name to whatever you want. I assume at the moment in your Scenario that value is "Fred".

It is also possible that RegisteredOrganization contains the value "Fred" and again can be modified if that is the case. That REG_SZ string is located in the same location as RegisteredOwner.


Regards,

Regedit32
 
Joined
Apr 16, 2016
Messages
27
Reaction score
3
Thanks Regedit32. That's almost certainly the reg entry I was looking for.
RegisteredOwner was still set to Fred even after username Fred was deleted.
RegisteredOrganisation was blank, so that won't affect things.
I won't know if it's fixed the issue for sure until I next install some new software.

I also discovered another couple of registry entries still set to Fred:-
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LastUsedUsername

Methinks there should be an easier way to clean up after deleting or renaming a user without having to hunt around and edit the registry manually. Another reason I prefer Linux.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Hi Brian,

Thanks for the update.

As I said in my original post this is be design in Windows however I've never really bothered to investigate why exactly. My best guest is originally it was a security feature to help prevent malicious code completely taking over User Permissions.

Even after changing RegisteredOwner, and if you chose to rename that ProfileImagePath from my original post you will more than likely see in the Windows Permissions tool that Fred persists.

The one thing you need to be cautious with is if you edit too far here you may find the Windows Themes settings for the original profile will not work on your new profile and thus will need to be reset.

As for those two keys you just posted: I'd leave those alone for now as they are useful if you happen to have a network setup with more than one User account. The second entry LastUserName can be modified if you run into a scenario where a guest auto logs into the LastUserName which obiously would not be optimal.

That though is a whole new issue to deal with and one I've posted here in the past about. Another built in feature in Windows is its ability to override your editing in the Registry each time it boots up when it comes to multiple User accounts. You can overcome this using a simple script, but first you need to right click the key | select permissions | and change things. The reality is any modification to do with Windows Logon is risky as one mistake will prevent you logging in at all on your next Restart of computer. Apart from that, right now this particular modification is not relevant to your issue.

Anyway I am glad we got there in the end.

Happy Computing.

Regedit32
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top