Two words

 

Option Explicit

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harding, Devon
Sent: Monday, November 14, 2005 6:05 PM
To: [email protected]
Subject: [ActiveDir] strGrooup?

 

I cannot figure this one out.  Why doesn’t the following script work when I use ‘strGroup’, instead, it works (maps drives) when I use strGrooup.  strGrooup isn’t even defined.

 

Option Explicit

Dim objNetwork, objUser, CurrentUser, objFSO

Dim strGroup

 

Const Windows_Group = "BSG - IS Windows Systems"

Const Pricing_Group = "gs-ssd-pricing"

Const IPCC_Group = "IPCCGroup"

Const IXOS_Group = "IXOS_ScanPost_Common"

 

Set objNetwork = CreateObject("WScript.Network")

' Forces script to skip errors (rem below line to see errors)

on error resume next

 

Dim WshNetwork

Set WshNetwork = WScript.CreateObject("WScript.Network")

' Set all drives to be removed here.

WshNetwork.RemoveNetworkDrive "e:"

WshNetwork.RemoveNetworkDrive "f:"

 

Set objUser = CreateObject("ADSystemInfo")

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

strGroup = LCase(Join(CurrentUser.MemberOf))

 

if instr(strGrooup, Windows_Group) then

 objNetwork.MapNetworkDrive "s:", "\\gsfps2\siteshare"

 objNetwork.MapNetworkDrive "u:", "\\gsfps2\users"

end if

 

if instr(strGroup, IXOS_Group) then

 objNetwork.MapNetworkDrive "e:", "\\gsimage2\IXOS_ScanPost_Common\Late Archive"

 objNetwork.MapNetworkDrive "f:", "\\gsimage2\IXOS_ScanPost_Common\Common Post"

 objNetwork.MapNetworkDrive "i:", "\\gsimage2\IXOS_ScanPost_Common\Normal"

 objNetwork.MapNetworkDrive "j:", "\\gsimage2\IXOS_ScanPost_Common\Demand"

 objNetwork.MapNetworkDrive "k:", "\\gsimage2\IXOS_ScanPost_Common\Emergency"

end if

 

Devon Harding

Windows Systems Engineer

Southern Wine & Spirits - BSG

954-602-2469

 


__________________________________
This message and any attachments are solely for the intended recipient
and may contain confidential or privileged information. If you are not
the intended recipient, any disclosure, copying, use or distribution of
the information included in the message and any attachments is
prohibited. If you have received this communication in error, please
notify us by reply e-mail and immediately and permanently delete this
message and any attachments. Thank You.

Reply via email to