See also
code:
;-------------------------------------
; map printers based on user groups
;
; Structure of the .INI file:
; [Printer name]
; Printserver = Name of the printserver (might be comma-delimited for redundancy)
; GroupInclude = User groups to be included in the printer connection
; CompExclude = Computers to be excluded from the drive share
; UserInclude = Users to be included in the drive share
; Model = Model of the printer
;-------------------------------------
; UDFs: ATRIM(), ISINCLUDED(), MAPPRINTER()
:NETWORKED_PRINTERS
Dim $printerlist, $printername, $printserver, $printmodel
Dim $GroupInclude, $CompExclude, $UserInclude, $os, $rc

if @INWIN=1
if exist($PRINTERSINI)
? 'Connecting network printers'
$printerlist=readprofilestring($PRINTERSINI,'','')
$printerlist=atrim(split($printerlist,chr(10)))
for each $printername in $printerlist
if len($printername)
$GroupInclude=readprofilestring($PRINTERSINI,$printername,'GroupInclude')
$GroupInclude=atrim(split($GroupInclude,','))
$CompExclude=readprofilestring($PRINTERSINI,$printername,'CompExclude')
$CompExclude=atrim(split($CompExclude,','))
$UserInclude=readprofilestring($PRINTERSINI,$printername,'UserInclude')
$UserInclude=atrim(split($UserInclude,','))

if isincluded($GroupInclude, $CompExclude, $UserInclude)
$printserver=readprofilestring($PRINTERSINI,$printername,'Printserver')
$printserver=atrim(split($printserver,','))
$printmodel=readprofilestring($PRINTERSINI,$printername,'Model')
$rc=mapprinter($printername,$printserver,$printmodel)
endif
endif
next
else
? 'Cannot open printer initialization file '+$PRINTERSINI
endif
else
? 'Automatic printer installation is not supported under '+@PRODUCTTYPE
endif
return

which is part of a modular login script to be found at Modular Login Script (long post, lots of code) and is also used as part of KiXtart Systems Management Server

[ 21. August 2002, 16:04: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.