Just taking a cursory look at the script your consultant produced, I'd say it's time to let him go and do it yourself. I can't believe that he maps default printers by checking each computername in multiple IFs and then uses GOTOs to jump all over the place inside that script.
There are more effecive, elegant and, simpler ways to accomplish this. One way would be, yes, my favirote toy, the .INI file:
code:
; printers.ini
[Defaults]
LASERJET=LSF-2,LSF-4,LSF-6
LASERJET1=LSF-1,LSF-3,LSF-5
KiXtart:
code:
; KiXtart 4.20
$defaultprinters=split(readprofilestring('printers.ini','Defaults',''),chr(10))
for each $printer in $$defaultprinters
$comps=split($readprofilestring('printers.ini','Defaults'$printer),chr(10))
if ascan($comps,@WKSTA)
$rc=setdefaultprinter($printer)
endif
next
This is just a framework, there are other ways to do this.
[ 21. March 2003, 15:13: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.