Link to home
Start Free TrialLog in
Avatar of schef84
schef84

asked on

Login Script to Group Members

I have a group of users setup in Active Directory called payroll that I would like a specific drive mapped to.  I have the below script, but it maps the drive no matter if the condition is met or not:

ifgroup "Domain\payroll"
(
NET USE V: //server/share
)


Any ideas on how to map a specific drive to a group membership as the determining factor in a batch file?
Avatar of gwerner99
gwerner99

Use Kix scripting and it is easier to decipher a group, user or machine. You can pull Kix off the web and it functions good on NT based machines.
Examples:
;Map users Home Drive  **************************************
      $USR=@USERID
      USE h: /del
      USE h: "\\server\@USERID$$"
      
; Administration ********************************************
if INGROUP ("Administration")
      use f: "\\server\apps"
      use g: "\\server\school"
      use i: "\\server\administration"
      use k: "\\server\common$"
      exit
endif
ASKER CERTIFIED SOLUTION
Avatar of rj-smith
rj-smith
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The only way I have seen it done in a batch file is using "If Member" utility.  I can't even remember that program is anymore (must be old age).  However, you can program it if you use KIX scripting for your login file.  I would recommend either learning KIX (if you have ever used VB it is very similar) or using a product from www.simplifiednetworking.com called Visual Kix.  It is very easy to use.

Good luck.

Bill
Avatar of schef84

ASKER

Thanks for the quick responses!