I always forget whether the setdefault, addprinter, and delprinter functions need the share name, the printer name, or whatever. Many around here religiously name the printers and the share name, the exact same thing so that it is not an issue. Personally, I like using the share name and wrote a function to get around not being able to do this. Your choice, but I would start in these two places.

PrinterConnection has the ability to add, del, set and determine the default printer, all using the same share name. Examples are in the header of the UDF.

PrinterConnection -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=203840#Post203840

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1





_________________________
(... better days ahead)