There is a slight difference between AddPrinterConnection and SetdefaultPrinter. The first takes the printer share (like \\server\printer) and the second takes the printer name (like HP4000 on server1). Also if AddPrinterConnection fails SetDefualprinter for the same printer will also fail if the printer is not still mapped from a previous session.
I always keep the printer name and share name the same so the example below works fine. Are the printer name and the printer share the same in your setup?

 Code:
If InGroup("Printer1")
	$rc = AddPrinterConnection ("\\server1\printer1")
	$rc = SetDefaultPrinter ("\\server1\printer1")
EndIf
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.