Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i did something rather stupid and now i don't know how to fix my mistake.

i built a new PC with an SSD and a HDD. the SSD is for the system files and most applications, but the HDD is for data. for the following user library folders i followed this tutorial on how to change their location so windows would target my data drive instead of the c:\ drive:

  • Desktop
  • Downloads
  • My Documents
  • My Music
  • My Videos

while attempting to move the location of My Documents folder to the data drive, i completely messed up. i hadn't created an empty folder on the data drive to target, so i simply selected the actual data drive, which caused My Documents folder inside my user library to become my Data drive. I removed the data drive and now the My Documents folder is no where to be found.

attempting to create another folder called "My Documents" doesn't seem enough as the properties options are different and there is no option to change location. in a bit of a frenzy i did some other steps which i don't exactly recall, but they did involve deleting some folders from the data drive.

now, in windows explorer, if i click on My Documents under favorites/Libraries, i receive the following error:

This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create and association in the Default Programs control panel.

the (potentially) good news is that none of these folders had any saved data as i just started setting up the OS, but since i'm a total Windows n00b i have no idea about the extent of the damage.

how can i recreate/restore these folders and start from the beginning without having to reinstall windows?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You and me both. This is an untested answer.

The "Shell Folder" for that is actually called "Documents" not "My Documents" It is given a localised resource name by a DLL as called up by the desktop.ini that was in the folder.
I wish I was making this up :-) , or could actually understand it.

From what I can figure, to retract it back the way it was:

Stage 1 change the registry location back:
Search the registry for "shell folders" reset the changed locations for the documents item back to where it should be or where you want it to be, using the other MY stuff as the template. It should be the one with the user name, and it is "Documents" not My documents. (F3 will search again in regedit)

Sure it might take you a few minutes in the registry to correlate your brain with what you seeing, and to locate the items that are changed, but If I can do it, you can. Check for the other "My" items, use them as templates.

Next I think you would reboot, and the system would remake this folder usually. If you think you need to create the folder, you could and again it would be called Documents. The folder attributes should probably be System.

Stage 2 Fix the desktop.ini
Find yourself a "My Documents" Desktop.ini (specific) and toss it into the Documents folder, and reboot.

the contents of mine are like this

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

You could create this desktop.ini for it, by copy pasting that into a notepad, It has One added blank line at the top and finish the text with a EOL (enter). (probably unnessisary). Save this notepad file out , then rename it to desktop.ini. set the attributes to Read_Only and Hidden and System.

If you need any more help or it did not work, make sure that you reboot or at least stop and start the explorer.exe. The files and folders have the correct attributes, and use your templates, the ones that are there that Do work, or a working system.
If you cannot see the desktop.ini after you change it to hidden and system, you will want to change the "folder options" at least temporarily so you can see things.

Stage 3: Setting the permissons the same, on the folder.
I don't think there would be a permissions change needed, but again use the other MY templates, and provide similar permissions.

share|improve this answer
    
thanks for the detailed reply :) i would have liked to test it out but i got impatient looking for answers so i took the easy way out and created a new admin account while deleting the old one. –  TheDarkIn1978 Mar 5 '12 at 0:31
    
@TheDarkIn1978 When you had nothing there, making a new user sounds faster and easier, and a better answer. –  Psycogeek Mar 5 '12 at 0:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.