Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script Issue

Status
Not open for further replies.

andyds

IS-IT--Management
Feb 22, 2007
91
GB
Windows Server 2003 - I was wondering if anybody knew a VB script that would allow me to re-direct a users desktop to a server share that held the icons to display on the users desktop.

I do not want to use the GPO re-direct policy as I only have one global policy and different departments need different logon scripts for different icons.

Any help would be appreciated.
 
In the past i've used this script to redirect internet faves which are under the same key, you can use it to redirect the desktop as well the only problem is that you need to restart explorer the first time. I haven't tried it with a UNC path but it should work.

Code:
Option Explicit

On Error Resume Next

Dim WSHShell, Path

Set WSHShell = CreateObject("WScript.Shell")


WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites", "U:\Favorites", "REG_EXPAND_SZ"
WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites", "U:\Favorites", "REG_SZ"

set WSHSHell = Nothing

wscript.quit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top