I'd better start on the ini file. Here's what I have pilfered from others here at this site (Thanks!). Currently I am just reading the printers and creating the ini file. Before posting, I uncommented the part that writes the printers, mainly to let you know I had some code already, but wasn't brave enought to start using. I didn't want you to spend time trying to help me out with code you've probably already posted here. If you have any suggestions on the script, they are valued.

Thanks.

Current Printersetup.ini file

[Printers]
1=\\mrh1\q-mis2
2=\\mrh-01\q-mis2-color
3=\\mrh-01\q-mis2
Default=\\mrh-01\q-mis2

Current Script that writes Printersetup.ini
code:
;********** Prevent logon script on server *********
call @ScriptDir+'\osid.udf'

$os=osid()
if $os[2]<>'Workstation'
exit 0
endif

;********** Beginning of printer info gathering script *********


;Re-Write at http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=2;t=004308
;By Kdyer & Lonkero (15th april 2003)

;Re-Write of http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=10;t=000021

;Default Printer Configuration
;This is to capture the Default Printer and get all network defined printers as well
; Ref. http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=006790
; Ref. http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000221

$loc='HKEY_CURRENT_USER\Network\LPT1'
$reg='HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion'
$dev=$reg+'\Devices'
$nprt=split(READVALUE($reg+'\Windows','Device'),',')[0]
$sysdrv=SUBSTR('%WINDIR%',1,2)
dim $priReg, $x, $i, $rc, $ps

; Set Printsetup.ini file location
$ps=('\\mrh-01\prtlog$')
$ps=($ps+'\@wksta'+'_'+'@userid')
;$ps=($ps+'\@wksta')
IF 0=EXIST($ps)
MD $ps
ENDIF
$ps=$ps+'\Printsetup.ini'

$i=0
DO
IF '\\'=LEFT($x,2)
$priReg=$priReg+$x
ENDIF
$x=ENUMVALUE($dev,$i)
$i=$i+1
UNTIL @error

IF LEN($priReg)
$rc=WRITEPROFILESTRING($ps,'Printers','','')
$priReg=split($priReg,'\\')
FOR $i=1 to ubound($priReg)
$rc=WRITEPROFILESTRING($ps,'Printers',$i,'\\'+$priReg[$i])
NEXT
ENDIF

SELECT
CASE INSTR($nprt,'\\') ;WRITE THE DEFAULT PRINTER TO THE CONFIG
$rc=WRITEPROFILESTRING($ps,'Printers','Default',$nprt)
USE LPT1: /delete /persistent
USE LPT1: $nprt /persistent

CASE $nprt='' AND EXIST($ps) ;NO DEFAULT PRINTER, LOAD PRINTERS FROM SAVED INFO
FOR EACH $key IN split(readprofilestring($ps,'Printers',''),chr(10))
$nul=addprinterconnection(readprofilestring($ps,'Printers',$key))
NEXT
$nprt=READPROFILESTRING($ps,'Printers','Default')
$rc=SETDEFAULTPRINTER($nprt)
USE LPT1: $nprt /persistent
CASE NOT INSTR($nprt,'\\') ;LOCAL PRINTER DEFAULT, SO WE WANT TO REMOVE NETWORK MAPPING
USE LPT1: /delete /persistent
ENDSELECT



[ 10. October 2003, 03:41: Message edited by: tjcarst ]