Try catching the error your setdefaultprinter() function returns and report back ;\)
_________________________