Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows 7 Folder Redirection with VBScript

Posted on 2010-11-30
1
Medium Priority
?
1,947 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 59

Accepted Solution

by:
Bill Prew earned 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
Suggested Courses

886 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