Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do you change the default location for My Documents?

Posted on 2011-03-06
5
Medium Priority
?
450 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 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
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 video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 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