i think i got this script off this site, but just need a little help...
In the part between ' general users and the first IF statement is there a string that i can add to remove all network drives apart form U: as this is the users userarea. Ive triedCode:Const Staff = "cn=staff" Const Maths = "cn=mathematics" Const PowerStaff = "cn=powerstaff" Const ITTeach = "cn=information technology" Const ITAdmin = "cn=admin" Const DesignTechnology = "cn=design technology" Const H2L = "cn=special needs" ' admin settings Const AdminStaff = "cn=generaladmin" Const OfficeGroup = "cn=Office Group" Set wshnetwork = CreateObject("WScript.Network") Set ADSysInfo = CreateObject("ADSystemInfo") Set CurrentUser = GetObject("LDAP://" & ADSysInfo.Username) strGroups = LCase(Join(CurrentUser.MemberOf)) ' general users If Instr(strGroups,staff) Then On Error Resume Next wshnetwork.RemoveNetworkDrive "p:" wshnetwork.RemoveNetworkDrive "s:" wshnetwork.RemoveNetworkDrive "v:" wshnetwork.RemoveNetworkDrive "q:" wshNetwork.MapNetworkDrive "p:","\\hades\upublic" wshNetwork.MapNetworkDrive "s:","\\hades\business" wshNetwork.MapNetworkDrive "v:","\\hades\uapps" wshnetwork.mapnetworkdrive "q:","\\seth\users\home\administration" If Instr(strGroups,ITAdmin) Thenbut that didnt work. Can any one suggest anything??Code:wshnetwor.Removenetworkconnection <> "u:"
Thanks
T



LinkBack URL
About LinkBacks

Reply With Quote

