Question : Vbs script to add specific user to group

Hi Guys,

We haved the following text in a logon script which is currently working great -

'Const FCADC42_Personnel = "cn=FCADC42_Personnel"
If InStr(strGroup, lcase(FCADC42_Personnel)) Then
objNetwork.MapNetworkDrive "f:", "\\FCADC42\Personnel"
End If

This maps a drive to F:\ as long as you are a member of personnel, however one member of this department needs to use a pen drive which has to map to F:\.

So basically I want to edit my logon script to say IF MEMBER OF PERSONNEL and YOUR NAME IS FRED BLOGGS MAP TO  W:\.

Any ideas how I can edit my existing script which a VBS file?

Answer : Vbs script to add specific user to group

Hopefully this will work.
1:
2:
3:
4:
5:
6:
7:
8:
strLSUserName = "CN=Leah Bugg,OU=Central Services,OU=FCA Users,DC=thefca,DC=co,DC=uk" 
If InStr(strGroup, lcase(FCADC42_Personnel)) Then 
	If Not Lcase(objuser.UserName) = Lcase(StrLSUserName) Then
		objNetwork.MapNetworkDrive "f:", "\\FCADC42\Personnel"
	Else
		objNetwork.MapNetworkDrive "w:", "\\FCADC42\Personnel"		
	End If
End If
Random Solutions  
 
programming4us programming4us