Quote:

Printer Config
Printer Name: HP LaserJet 6L
Share Name: HPLaserJ
PC Name: richardpc




Code:
SetDefaultPrinter("\\richardpc\HPLaserJ")
? 'Error: '+@ERROR+': '+@SERROR


Quote:

Error: 2: The system cannot find the file specified.




Code:
SetDefaultPrinter("HPLaserJ")
? 'Error: '+@ERROR+': '+@SERROR


Quote:

{Error: 2: The system cannot find the file specified.




Code:
SetDefaultPrinter("HP LaserJet 6L")
? 'Error: '+@ERROR+': '+@SERROR


Quote:

Error: 0: The operation completed successfully.




As you can see the last code that uses the printer lable name works, tested using Windows XP SP2.

IIRC you need admin rights to set default printer under Windows XP SP2 as well, will report back but I think it has been reported in old posts.

Thanks

Rich