New
#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.