scream
New member
Hi, i have created below logon script to mount network drive based on user name:
set objShell = CreateObject("Wscript.Shell")
strUserName = objShell.ExpandEnvironmentStrings("%username%")
Set objWSHNet = CreateObject("WScript.Network")
'Map drive for Username
objWSHNet.MapNetworkDrive "X:", "\\servername\" & strUsername & "$"
if err.number=0 then
sDrive = "X:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sDrive).Self.Name = "Home Folder"
end if
now i want to map folders based on the user's group memberships. please help me in this regards.
set objShell = CreateObject("Wscript.Shell")
strUserName = objShell.ExpandEnvironmentStrings("%username%")
Set objWSHNet = CreateObject("WScript.Network")
'Map drive for Username
objWSHNet.MapNetworkDrive "X:", "\\servername\" & strUsername & "$"
if err.number=0 then
sDrive = "X:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(sDrive).Self.Name = "Home Folder"
end if
now i want to map folders based on the user's group memberships. please help me in this regards.