Solved

Windows 7 Folder Redirection with VBScript

Posted on 2010-11-30
1
1,771 Views
Last Modified: 2012-06-21
Basic Question: Looking for an example VBScript that would do folder redirection (for the common windows folders, I consider these to be the default options in Group Policy) to a mapped drive for Windows 7 users.

Longer Story: Our users have file servers in their individual locations.  Off of the file server they get a user drive (W Drive for us).  We want to redirect the common windows folders to the user directory.  We had it applying via Group Policy but I need to change the way we do it for various reasons.
0
Comment
Question by:matt_karsten
1 Comment
 
LVL 53

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 34241746
This is quite easy to do in VBS, you just need to set the appropriate registry values for the folders you want to move.  Here's an example:

set WshShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop", "Z:\user1\Desktop", "REG_EXPAND_SZ"

Open in new window

The various subkeys are listed here:

http://www.winhelponline.com/articles/95/1/How-to-move-the-special-folders-in-Windows-Vista.html

~bp
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

813 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

10 Experts available now in Live!

Get 1:1 Help Now