|
I don't have a Win9X to test this on, but Win2K/2K3/XP is fair game for this:
Set wshNetwork = WScript.CreateObject("WScript.Network")
Set wshShell = WScript.CreateObject("WScript.Shell") str_Group1_Share = "file://myserver/myShare1"
str_Exec_Share = "file://myserver/myShare2" str_BS_Share = "file://myserver/myShare3" str_Super_Share = "file://mySuperServer/SuperShare" strDriveToMap = "H:"
usrName = wshShell.ExpandEnvironmentStrings("%USERNAME%") Set usr = GetObject("WinNT://MyDomainName/" & usrName & ",user") For Each grp In usr.Groups
WScript.Echo grp.Name If grp.Name = "BS-Group" Then wshNetwork.MapNetworkDrive strDriveToMap, str_BS_Share Exit For Elseif grp.Name = "SOME_GROUP" Then wshNetwork.MapNetworkDrive strDriveToMap, str_Group1_Share Exit For Elseif grp.Name = "yet_Another_Group" OR grp.Name = "Super-DuperUser" Then wshNetwork.MapNetworkDrive strDriveToMap, str_Super_Share wshNetwork.MapNetworkDrive "K:", str_Exec_Share Exit For End If Next Set usr = Nothing
Set wshShell = Nothing Set wshNetwork = Nothing HTH
Sincerely,
D�j� Ak�m�l�f�, MCSE MCSA MCP+I Microsoft MVP - Active Directory www.akomolafe.com www.iyaburo.com Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon From: Nathan Casey Sent: Mon 4/12/2004 4:17 PM To: [EMAIL PROTECTED] Subject: [ActiveDir] logon scripts What is a recommended logon script solution that will work with win9x, win2k/xp clients for drive mapping, etc that works similar to Novell logon scripts? Example: IF MEMBER OF "GROUP" THEN BEGIN MAP H:=SERVER1\VOL1: END |
- [ActiveDir] Logon Scripts jamie . simcox
- [ActiveDir] Logon scripts Charlie Hope-Lang
- RE: [ActiveDir] Logon scripts David Lloyd
- Re: [ActiveDir] Logon scripts John Hicks/MIS/HQ/KEMET/US
- [ActiveDir] logon scripts Nathan Casey
- RE: [ActiveDir] logon scripts deji Agba
- RE: [ActiveDir] logon scripts Rick Kingslan
- RE: [ActiveDir] logon scripts deji Agba
- RE: [ActiveDir] logon scr... Rick Kingslan
- RE: [ActiveDir] logon scripts Rick Kingslan
- [ActiveDir] Firewall Douglas M. Long
- Re: [ActiveDir] Firewall Robbie Foust
- RE: [ActiveDir] Firewall Douglas M. Long
- RE: [ActiveDir] logon scripts Roger Seielstad
- RE: [ActiveDir] logon scripts deji Agba
