Vbscript needs admin rights??????

  • Thread starter Thread starter daragh
  • Start date Start date
D

daragh

My Vbscript will only run if the user has domain admin
rights, if the user does not have Domain Admin rights, it
fails on the Join command (5th line in the sample below)
Here is a sample of the script, any help??

Pleaseeeee


Const SALES = "cn=sales"

Set wshNetwork = CreateObject("WScript.Network")

strGroups = LCase(join(CurrentUser.MemberOf))

If InStr(strGroups, SALES) Then

wshNetwork.MapNetworkDrive "j:", "\\server\sales"
 
Daragh,

Are you trying to create a logon script that will map drives based on group
membership? So, the people in the security group 'Accounting' - who have
access to the departmental folder 'Accounting' via NTFS permissions - will
have a mapped network drive to that 'Accounting' folder where as the people
in the 'Finance' security group will have the same drive letter mapped to
the 'Finance' folder?

If that is the case then I can point you to either ifMember ( .bat or
..cmd ), kixtart ( .kix ) or .vbs logon scripts. For the .vbs scripts I
might suggest that you take a look at Richard Mueller's website at
http://www.rlmueller.net as he has several sample scripts for this that work
just beautifully.

If you are trying to join the user who is logging on and making use of this
logon script to a group then I can not be of much help other than to point
you to the scripting NewsGroup. However, I am sure that there are several
in here who can help you. I am not sure that this would be the proper
approach, though.

HTH,

Cary
 
Back
Top