Script to change the location of Documents folder in Windows 7


  1. Posts : 3
    Windows 7
       #1

    Script to change the location of Documents folder in Windows 7


    Hi! I currently inherited a Windows 7 image that has the default location for the users' My Documents folder configured incorrectly. When a domain or local user account logs in to the machine for the first time the Documents directory, which by default should be located on %userprofile%\Documents and C:\Users\Public, is being set to point to the "My Documents" SHORTCUT folder and not the actual Documents folder inside C:\Users\%username%\. See screenshot.

    I'd like to fix this by running a script that will remove both directories and only specify C:\Users\%username%\Documents as the only and default My Documents directory for the user.

    Unfortunately, doing this via Group Policy is not an option. And since the image I am using was created by a previous technician I couldn't just create a new image since there are tons of software and customization already incorporated on it. I also tried exporting and importing the registry key for it on the explorer shell but that only seemed to work for the user where I exported the key from.

    It would be nice if I have a more permanent fix for it so any new user logging in would have the correct path already set instead of me running a script for every user to fix it but if there's a simply and quick script to do it I can live with that.
    Attached Thumbnails Attached Thumbnails Script to change the location of Documents folder in Windows 7-documents_old.jpg   Script to change the location of Documents folder in Windows 7-documents_new.jpg  
      My Computer


  2. Posts : 2,177
    Windows 8.1 Pro x64
       #2

    Hi Medyo,

    Take a look at these guides to see if they do what you are trying to achieve.



    Regards,
    Jamie
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:08.
Find Us