Syntax looks correct.
What if you put this line directly below the setdefaultprinter line and see what it gives.
The sleep line is just to halt the script so you can read the stuff on the screen.

Code:

?@error @serror
?Sleeping for 5 seconds.....
Sleep 5



Edited by Mart (2005-09-15 01:49 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.