Solved

How do you change the default location for My Documents?

Posted on 2011-03-06
5
442 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now