• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

trouble with MS .vbs script pulled from their website

Homerboy

Lifer
I'm trying to append our login script to map certin drives based on a user's group membership.
I ripped down a script posted on MS's site HERE but when I login it simply doesn't map the drive. No errors no nothing.

What I have:


'****** ADD DRIVES BASED ON GROUP MEMBERSHIP ******

On Error Resume Next

Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")

strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)

For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN

Select Case strGroupName
Case "Managers"
objNetwork.MapNetworkDrive "X:", "\\Files\Users"

End Select
Next
 
meh... don't worry about it. I just set up a small GPO that runs a special login script for the given user group that will map the drive. Its not eloquent or "right" but it serves the purpose. Thanks for the interest though. I'm sure I'll have more script questions soon enough....

Is there anywhere you suggest to read up on/learn about scripting in vbs?


 
Back
Top