Solved

Windows 7 Folder Redirection with VBScript

Posted on 2010-11-30
1
1,795 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

856 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