|
Hi,
I am trying to add the addprinterconnection and the defaut printer depending on the users group membership. When I run the script it seems to make the last addprinterconnection the default printer even when the user is not a member of the default printer group.
The naming convention is that all printers have the same name as their share name. The D in the group name denotes the members of the group should have the printer made as their defaut printer:
ie. If you are a member of the Prn_05-G group you should have access to printer prn_05, if you are a member of the Prn_05D-G then this should be your default printer.
Here is what I've come up with
IF INGROUP ("Prn_01-G") ADDPRINTERCONNECTION ("\\server\Prn_01") ENDIF IF INGROUP ("Prn_01D-G") SETDEFAULTPRINTER ("\\server\Prn_01") ENDIF IF INGROUP ("Prn_02-G") ADDPRINTERCONNECTION ("\\server\Prn_02") ENDIF IF INGROUP ("Prn_02D-G") SETDEFAULTPRINTER ("\\server\Prn_02") ENDIF IF INGROUP ("Prn_03-G") ADDPRINTERCONNECTION ("\\server\Prn_03") ENDIF IF INGROUP ("Prn_03D-G") SETDEFAULTPRINTER ("\\server\Prn_03") ENDIF IF INGROUP ("Prn_04-G") ADDPRINTERCONNECTION ("\\server\Prn_04") ENDIF IF INGROUP ("Prn_04D-G") SETDEFAULTPRINTER ("\\server\Prn_04") ENDIF IF INGROUP ("Prn_05-G") ADDPRINTERCONNECTION ("\\server\Prn_05") ENDIF ;IF INGROUP ("Prn_05D-G") SETDEFAULTPRINTER ("\\server\Prn_05") ;ENDIF IF INGROUP ("Prn_06-G") ADDPRINTERCONNECTION ("\\server\Prn_06") ENDIF IF INGROUP ("Prn_06D-G") SETDEFAULTPRINTER ("\\server\Prn_06") ENDIF IF INGROUP ("Prn_07-G") ADDPRINTERCONNECTION ("\\server\Prn_07") ENDIF
Thanks in advance
|