Quote:

Remember that PRINTER NAME and SHARE NAME can be different. The SetDefaultPrinter wants the PRINTER NAME, but if you created the printer with the AddPrinterConnection, you must include both the servername and the sharename.

SetDefaultPrinter('\\Server\sharename')

You can use a variable to prevent the return code from being seen on the console and you can output the error-code if wanted to verify

$RC=SetDefaultPrinter('\\Server\sharename')
'Setting Printer Default: ' + @SERROR ?
 




no.
this is exactly what it is not.
it's the PRINTERNAME!

$RC=SetDefaultPrinter('\\Server\PRINTERNAME')

btw doc, you copied these lines from some doc, right?
I mean, it must be.
you a veteran, you wouldn't go this far out there without support of written word...


Edited by Jooel (2005-12-16 12:36 PM)
_________________________
!

download KiXnet