Messed up Windows 10 User Folder Registry

0

I was trying to, and successfully did, change the "Personal Folder" that some applications store their data in from My Documents to my User Folder. I don't like the clutter that it introduces to the My Documents folder. Anyway I went to my User folder today and the name had changed to "Documents" and the icon as well. I moved the "Personal Folder" from %USERPROFILE% to %USERPROFILE%/Documents but the icon and name were not changed back. Note that the name is correct in cmd, just not in Explorer:

Screenshot

I changed these values in the registry in:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

and all other similar keys.

Screenshot

I'd like to change the explorer virtual name of my User Folder back to Zack instead of Documents, and change the icon back to the User icon. I know that messing with the registry can lead to unexpected outcomes like this, and this is a minor annoyance rather than a major issues, so I am lucky.

Gorlock

Posted 2019-12-14T21:28:45.780

Reputation: 31

2You might be able to do this by disconnecting your Microsoft account, assigning a new name when prompted, then linking it back to your Microsoft Account. However, whatever method you used to create this situation, is unsupported for a reason – Ramhound – 2019-12-14T22:07:20.673

Answers

3

The reason the name change & custom icon persisted after modifying the registry is the desktop.ini file that was created during the original relocation. The file normally has both Hidden & System attributes set, so you have to set Explorer's view options accordingly:

enter image description here

It's a plain text file that can be Viewed in Notepad or via a PowerShell window:

PS C:\...\Documents>gc desktop.ini

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235
[ViewState]
Mode=
Vid=
FolderType=Documents

The actual folder name of Zach was never changed. Its display name was changed by the LocalizedResourceName parameter in the desktop.ini file. It can be a literal string or resource reference, which you see in the standard files found in Windows system folders. On a normal Windows install, this is best illustrated by by the Public folders viewed in Explorer vs. PowerShell: enter image description here

PS C:\...\Documents>cd \users\public
PS C:\...\public>gci


    Directory: C:\users\public


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        9/22/2018  11:22 PM                CyberLink
d-r---        7/19/2019   8:49 PM                Documents
d-r---        3/18/2017   4:03 PM                Downloads
d-r---        9/10/2019  12:19 AM                Music
d-r---        3/18/2017   4:03 PM                Pictures
d-----        2/17/2018   3:19 PM                Roaming
d-r---        3/18/2017   4:03 PM                Videos
-a----        7/21/2018  12:08 PM           8192 NTUSER.DAT
-a----        7/21/2018  12:08 PM           8192 NTUSER.DAT.LOG1
-a----        7/21/2018  12:08 PM              0 NTUSER.DAT.LOG2

PS C:\...\documents>Get-Location                                                                       
Path
----
C:\Users\Public\documents


PS C:\...\documents>Get-ChildItem -Force                                                               

    Directory: C:\Users\Public\documents


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        7/21/2018   2:51 PM                Audible
d--hsl        2/19/2018  12:08 PM                My Music
d--hsl        2/19/2018  12:08 PM                My Pictures
d--hsl        2/19/2018  12:08 PM                My Videos
-a-hs-        3/18/2019  11:49 PM            278 desktop.ini


PS C:\...\documents>Get-Content .\desktop.ini                                                          
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21801
IconResource=%SystemRoot%\system32\imageres.dll,-3

Keith Miller

Posted 2019-12-14T21:28:45.780

Reputation: 1 789

2

I was actually able to solve the problem. I was making the problem more complicated than it was, no registry fixes were required.

I just right clicked the user folder Properties/Customize and changed the icon. Then I activated the administrator account and logged onto it.

From there I was able to manually rename the folder from Documents back to Zack. Logging back onto my main account did not revert these changes and now the explorer and cmd windows show the same result for the directory.

Gorlock

Posted 2019-12-14T21:28:45.780

Reputation: 31