Repair missing User folders in Windows 7

In https://scottiestech.info/2014/11/11/repair-missing-user-folders-in-windows-7/

Repair missing User folders in Windows 7

November 11th, 2014
At some point, you’ll probably run into a problem that doesn’t seem to have an easy solution: one of your default User folders in Windows 7 (My Documents, My Pictures, My Music, My Videos, Downloads, and Desktop) will suddenly disappear.
Try as you might, you won’t be able to restore these user folders, because they are actually “special”. Windows treats them differently than a normal folder you might create yourself, and they even have pretty icons, like so:

There is a lot of info out there on how to fix these built-in Windows 7 folders, but it’s all rather complicated.
So, here’s the boiled-down, anybody-can-do-it version on how to restore your missing User folders – or so I hope!
First, a few bits of info you’ll need to keep in mind. The default locations for the User folders in Windows 7 are:
  • C:\Users\USERNAME\Desktop
  • C:\Users\USERNAME\Documents
  • C:\Users\USERNAME\Downloads
  • C:\Users\USERNAME\Music
  • C:\Users\USERNAME\Pictures
  • C:\Users\USERNAME\Videos
Just replace USERNAME with your Windows account login, which in my case is “Scottie”. So, my Desktop folder is:
  • C:\Users\Scottie\Desktop
These are the actual names of the folders as stored on your hard drive, but since we’re talking about special User folders, they are magically turned into “My ___” folders with the special icon.
So, that’s that. Next, we’re gonna repair your folders. The process will go like this:
  1. Create/rename the User folders
  2. Edit the Registry to reset The Magic
  3. Run some command-prompt stuff to finish The Magic
  4. Reboot
Don’t worry, it’s all very simple!

Create/Rename the User Folders

So, open Explorer (Win-E, or double-click the Computer icon) and navigate to: C:\Users\USERNAME
Here, you’re going to need to decide which folder(s) are screwed up.
Even though the PATH to the User folder doesn’t contain the word “My”, the version you see in Explorer should look like so:
  • Desktop
  • My Documents
  • Downloads
  • My Music
  • My Pictures
  • My Videos
Note that “Desktop” and “Downloads” do NOT have “My” in front of them in Explorer, but they DO have Magic Folder Icons, which look like so:
If a “magic folder” icon is not there, and it just looks like a regular folder icon, you just need to check the folder name and change it if necessary. If a folder is completely missing, you’ll need to create a new one. Again, the following is the list of folders you may need to create/rename:
  • C:\Users\USERNAME\Desktop
  • C:\Users\USERNAME\Documents
  • C:\Users\USERNAME\Downloads
  • C:\Users\USERNAME\Music
  • C:\Users\USERNAME\Pictures
  • C:\Users\USERNAME\Videos
For example,  if you see “My Documents” and it’s a magic icon, you do not need to do anything.
If you see a normal yellow folder called “Documents”, do nothing.
If there is no “My Documents” or “Documents”, then create a new folder C:\Users\USERNAME\Documents.
There are two steps here:
  1. Check for the Magic Folder Icon
  2. Check that non-Magic Folders have the proper name, which prepares us for the next step
Maybe only your Downloads folder is screwed up, and all the other folders are okay (Desktop, My Documents, My Music, My Pictures, My Videos). In that case, make sure there is a folder “Downloads”. If there is, go to the next step. If there isn’t, create it first.

Reset the Registry User Folder Settings

This part might seem scary, but it’s really easy.
  1. Click Start
  2. Type: regedt32
  3. Click the program regedt32.exe to run the Registry Editor
  4. In the left pane, navigate to:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
You should see this:
RegEdit: User Shell Folders
(click to enlarge)
I’ve highlighted the fields you’ll need to look at. You can see that there is one entry for Downloads, one for Desktop, one for My Music, etc. For each folder you need to fix, you’ll want to do 2 things:
  1. Make sure the Name field is correct (far left, in pink)
  2. Make sure the Data field is correct (far right, in pink)
Now, in Windows 7, the path C:\Users\USERNAME\ is often written as %USERPROFILE% internally in Windows. This is just a variable that points to your Users directory. Simple, yes? It’s also quite handy.
So, in the Registry Editor, make sure you’re using the default values, like so (Name –> Data):
  • {374DE290-123F-4565-9164-39C4925E467B}  –>  %USERPROFILE%\Downloads
  • Desktop  –>  %USERPROFILE%\Desktop
  • My Music  –>  %USERPROFILE%\Music
  • My Pictures  –>  %USERPROFILE%\Pictures
  • My Video  –>  %USERPROFILE%\Videos
  • Personal  –>  %USERPROFILE%\Documents
Don’t ask me why the Name for Downloads is that wonky string, or why the Name for Documents is “Personal”… It’s Microsoft.
To correct the Name field, right-click the Name and select “Rename”:
RegEdit: Rename Key
To change the Data field (the folder path), double-click the name field, and enter the new path from the list above:
Registry: Modify Key Data
In my example, I don’t want My Documents pointing to E:\Users\Scottie\Documents, because I don’t have E: any more! Oops.
First, I made C:\Users\Scottie\Documents in the steps above.
Now in the Registry Editor, I would not change the Name of “Personal”, since that’s okay according to the list above. But I would double-click it, and change the Data to %USERPROFILE%\Documents
Do the same for any other User folders you need to fix. When you’re done editing, just close the Registry Editor (it saves automatically).

Last crazy step

Now you’re going to complete The Magic. Do this:
  1. Click Start
  2. Type: cmd
  3. Right-click cmd.exe and choose Run as administrator
  4. For each folder you need to fix or recreate, run the following command(s):
  • Downloads:
    attrib +r -s -h %USERPROFILE%\Downloads /S /D
  • Desktop:
    attrib +r -s -h %USERPROFILE%\Desktop /S /D
  • My Documents:
    attrib +r -s -h %USERPROFILE%\Documents /S /D
  • My Music:
    attrib +r -s -h %USERPROFILE%\Music /S /D
  • My Pictures:
    attrib +r -s -h %USERPROFILE%\Pictures /S /D
  • My Videos:
    attrib +r -s -h %USERPROFILE%\Videos /S /D
Highlight each “attrib” command you need above, and copy it (Ctrl-C, or right-click and pick Copy). Then, in the Command Prompt window, click the C:\ icon in the upper-left corner and choose Edit -> Paste:
Command Prompt paste!
Less typing = good!

Reboot

That’s it. You’ve made sure your missing folder(s) exist, you’ve done some Registry hacking to reset the Magic Folders, and you’ve set the proper attributes on your new folders.
All that’s left is to reboot! When you log back in, you should see your User folders restored to mint, magical condition.

Final Notes

Hopefully, this has been fairly easy to follow. For other User folders (Contacts) or for Windows 8, check outSeven Forums tutorial on this very topic.
I found their explanation rather difficult to follow, but it does have more information – and even some .REG files you can download and run to avoid doing any registry editing yourself. Check it out!

Comments

Popular posts from this blog

Add GitHub Repository to DBeaver CE Secured with SSH Protocol

Keyboard Shortcut to "Toggle Line Comments" in DBeaver

DBeaver Shortcuts