Note :Group policy are ok with W2K and WXp but won't work with W9X clients.
strUserFolder refer to the home folder of the user on the server.
I think I understand better what you want to do...so I add little to the
script.
This is a part of logon script I do use on a network with 2000 computers. It
work well with W9X, NT, W2K, WXP clients.
To use this script you should have a share folder on your server for every
user who log on.
If the logon name of the user is jerry then you should have a share folder
on the server named jerry and on witch the user have access right. =
strUserFolder
You should also create a sub folder named My Documents under eachs User
folders (Home)
This script map a drive "U:" to the User home folder (\\ServerName\UserName)
and redirect the system folder My Documents to the User home folder on the
server.
Hope it help
Patrice
Set objWshNet = WScript.CreateObject("WScript.Network")
Set objShell = Wscript.CreateObject("Wscript.Shell")
strUserFolder= fcnUserName
objWshNet.MapNetworkDrive "U:",\\ServerName\strUserFolder
objShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\Personal","U:\My Documents"
objShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders\Personal","U:\My Documents"
'***************************************************************************
******************
'fcnUserName
'***********
Function fcnUserName()
' Wait for the user to connect...
on error resume next
While strUserName = ""
Set objWshNet = CreateObject("WScript.Network")
on error resume next
strUserName = UCASE(objWshNet.UserName)
Wscript.sleep(200)
Set objWshNet = Nothing
Wend
fcnUserName = strUserName
End Function
'***************************************************************************
Tom Del Rosso said:
In Patrice Valiquette typed:
Try something like this on your logon script. Hope it help.
Set objWshNet = WScript.CreateObject("WScript.Network")
strUserFolder= fcnUserName
objWshNet.MapNetworkDrive "U:",\\ServerName\strUserFolder
[snip]
Thank you very much. Does the variable strUserFolder refer to the "My
Documents" folder on the desktop? I can't find a reference that says
so.