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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript for Remote Offices

Status
Not open for further replies.
Oct 8, 2002
62
0
0
US

HI i need some help here i fairly new to vbscripting. If done some basic scripts mapping drives, connectiong printers, running programs on login, but i want try something. I have 18 remote offices, i need to know if there's a way that on login i can change the my documents folder to a certain folder on my file-server. It's kinda like changing the target for my doc's.

 
If your client PC's are Windows 98 you can use the script part below :-

set personal=wscript.createobject("wscript.shell")

personal.regwrite"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User shell Folders\personal","\\SERVER_NAME\SHARE"

personal.regwrite"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal","SERVER_NAME\SHARE"
 
I have win2k but, i'll see if i can find similar or the same reg entries. thanks for giving me a push start.
 
Do you have a windows 2000 domain structure???
 
You can use folder redirection within the group policy object achive exactly what you want.

you can access the site's group policy object via "Active directory sites and services" -> "SiteName" -> "properties" -> "group policy tab" -> "edit"

then

"User Configuration" -> "Windows Settings" -> "Folder Redirection" -> "My Documents" -> "properties"

You will figure it out its fairly straight forward Just Add a security group that the policy applies to and input the Path I Like to use "\\ServerName\ShareName\%UserName%" then it will create a folder using the username of each user.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top