Rad, you've definately got some bug-a-boos in your code... 
I think I've got it the way I want now, but I'm still looking for suggestions...
BTW, using bitwise logic is slick... first time I've really used it.
Code:
Function PrinterList(optional $remotepc, optional $displaymode)
dim $service,$printer,$printers,$printerdesc[0],$counter,$portname
if $remotepc=""
$remotepc="."
endif
$Service = GetObject("winmgmts:\\" + $remotepc + "\root\cimv2")
if @error
exit @error
endif
$Printers=$service.execquery ('select * from Win32_Printer')
for each $printer in $printers
redim preserve $printerdesc[$counter]
if $displaymode & 1
$portname = "," + $printer.portname
endif
select
case $displaymode & 4 ;remote printers
if left($printer.portname,2)="\\"
$printerdesc[$counter]=$printer.name + $portname
$counter=$counter+1
endif
case $displaymode & 2 ;local printers
if left($printer.portname,2)<>"\\"
$printerdesc[$counter]=$printer.name + $portname
$counter=$counter+1
endif
case 1 ; all printers
$printerdesc[$counter]=$printer.name + $portname
$counter=$counter+1
endselect
next
$PrinterList=$printerdesc
endfunction
_________________________
(... better days ahead)