Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do you change the default location for My Documents?

Posted on 2011-03-06
5
Medium Priority
?
451 Views
Last Modified: 2012-05-11
Hi all,
I was wondering how to change the default location of 'my documents' from the c:\ directory to another location using a script.
I know how to do it manually, by right clicking and typing the new location, but i was wondering how to do it using a script or GPO...but preferably a script.
0
Comment
Question by:chriselibama
5 Comments
 
LVL 5

Accepted Solution

by:
TIGERMARK earned 2000 total points
ID: 35053723
You’ll need a VBS script to map the My Documents to the relevant network volume. Something like this:

Dim WSHShell
Set WSHShell = CreateObject(“WScript.Shell”)
WSHShell.RegWrite “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal”, “P:\”
WSHShell.RegWrite “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\My Pictures”, “P:\”

Then call the script in your batch file set to run on user login.

it is possible if you use AD. Follow the next steps:
1.- Create a script something like:
net use o: \\servername\FileServer
2.- Go to a user, Right click properties and click Profile tab.
3.- You will see there is a logon script field. Enter your script name.
4.- Paste your script file into C:\WINDOWS\SYSVOL\sysvol\domain.name\scripts

That should do it.



0
 
LVL 6

Expert Comment

by:KitkatNinja
ID: 35053744
At work we do not use a script, we use a GPO to redirect My Doc's for over 1200 users.  See this technet article, it contains step by step instructions to redirect the My Doc's to the user's home drive (this is also set in AD, under user's own properties):

http://technet.microsoft.com/en-us/library/cc783674(WS.10).aspx

As for a script, you can check this out: http://help.wugnet.com/windows2/Redirect-default-folder-Windows-Explorer-ftopict459451.html

I can't vouch for it personally as I use the GPO method, but it looks ok.

-Ken
0
 
LVL 16

Expert Comment

by:speshalyst
ID: 35058889
0
 
LVL 16

Expert Comment

by:speshalyst
ID: 35059045
guess i missed the script part..

the idea is to get modifu the reg values under

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

Change the desired folder location, My Documents is normally list as "Personal"


You can use this article to write a Batch which will modify the registry ..
http://support.microsoft.com/kb/310516
0
 

Author Closing Comment

by:chriselibama
ID: 35064855
everyone,
thank you ALL for your input and advice.
very helpful!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question