Solved

How do you change the default location for My Documents?

Posted on 2011-03-06
5
441 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
Comment Utility
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
Comment Utility
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
Comment Utility
0
 
LVL 16

Expert Comment

by:speshalyst
Comment Utility
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
Comment Utility
everyone,
thank you ALL for your input and advice.
very helpful!!!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
need windows xp machines 13 164
ntdlr  is missing or corrupt 15 129
User laptop information 6 142
Upgrade or retire 8 95
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…
If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

6 Experts available now in Live!

Get 1:1 Help Now