Solved

How do you change the default location for My Documents?

Posted on 2011-03-06
5
449 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

630 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