'On Error Resume NextSet objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")strUserPath = "LDAP://"&objSysInfo.UserName
msgbox(struserpath)
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.memberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
msgbox(strGroupName) //is null.
Select Case strGroupName
Case "testuser"
objNetwork.MapNetworkDrive "t:", "\\testaccu7\users\"&objNetwork.UserName
End Select
Next
For Each strGroup in objUser.memberOf总报错,帮我看看什么错,谢谢!
Set objNetwork = CreateObject("Wscript.Network")strUserPath = "LDAP://"&objSysInfo.UserName
msgbox(struserpath)
Set objUser = GetObject(strUserPath)
For Each strGroup in objUser.memberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN
msgbox(strGroupName) //is null.
Select Case strGroupName
Case "testuser"
objNetwork.MapNetworkDrive "t:", "\\testaccu7\users\"&objNetwork.UserName
End Select
Next
For Each strGroup in objUser.memberOf总报错,帮我看看什么错,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货